Stanford has battled a virus since the Series race in Yokohama last month and was unable to mount a challenge.
The 2016 Olympian, who finished fourth in Rio, lost ground in the 1,500m swim and was unable to surmount the gap despite the assistance of fellow Yorkshire racer Learmonth.
Learmonth had been in the lead after the swim but gave up any personal hopes of a podium to aid Stanford's challenge.
The 29-year-old, who only competed in her first triathlon five years ago, produced a strong run to finish in sixth.
Stanford said: “I didn't give up. I thought we could salvage something but when we got off the bike I just had absolutely nothing. I had run myself into the ground..
“I'm gutted that Jess sacrificed her race and I couldn't deliver the team performance we tried to achieve."
World champion Flora Duffy was unflustered throughout the race as she claimed a second successive victory in the Series.
Duffy was in the leading groups in the swim and cycle before surging clear in the early stages of the run to back up her victory in Yokohama.
The 29-year-old stopped the clock on the blue-carpeted finish line at Millenium Square in one hour, 57 minutes two seconds, ahead of American Taylor Spivey and Italian Alice Betto – who finished on the podium for a first time.
It was the Bermudan's second successive women's victory in this year's World Triathlon Series.
Stanford, who moved to Leeds five years ago, lacked her usual strength in the run as she finished five places behind her British teammate.
The 28-year-old's chances of winning all but disappeared during the swim in Roundhay Park as British teammate Learmonth created a fierce pace at the front.
Learmonth maintained a lead from the first lap into the opening transition as she left the water six seconds ahead of Duffy in 17.47.
The fast pace had separated the pack and Stanford found herself trailing in a third group 58 seconds behind her British teammate at the front.
Learmonth powered ahead in the early uphill stages of the cycle but dropped back to find Stanford, allowing a leading group of four to emerge.
The lead group reached Leeds city centre with a 70-second lead but that was stretched to over two minutes during six twisting and turning laps around Victoria Gardens.
Duffy wasted no time in asserting her authority on the run and took out a 100m gap in the opening kilometre before finishing one minute 13 seconds ahead of Spivey.
Stanford was clearly struggling on the run and collapsed to the floor as she crossed the finish line - where she was embraced by Learmonth.