Media playback is not supported on this device
The 28-year-old had gone clear of New Zealand rival Andrea Hewitt with 200m to go.
But Hewitt responded strongly to pip the Briton on the line.
It was Stimpson's first race back after a six-month lay-off with an Achilles injury sustained after she missed out on Olympic selection.
Hewitt's winning time was two hours, three minutes and 46 seconds.
She was engaged to and coached by former French triathlete Laurent Vidal, who died of a heart attack in November 2015.
Find out how to get into triathlon in our special guide.
Afterwards, Stimpson refused to be downbeat over the defeat.
"I was the stronger one going up the hill so I was the one trying to put the pressure on each lap," she said.
"But if I was going to lose to a sprint finish, I am glad it was Andrea today.
"I can't thank my family enough for getting me through the last year."
Watch live coverage of the elite men's race on BBC Red Button, Connected TV and online on Saturday from 11:50-14:10 GMT.
And watch highlights of the men's and women's races on BBC Two on Sunday from 13:00-14:30 GMT.
Great Britain's Jodie Stimpson was edged out in a dramatic finish to the opening race of the 2017 World Triathlon Series in Abu Dhabi.