But the Italian's body language made clear he wasn't giving up and, after closing up to Lorenzo's rear wheel, made a seemingly impossible pass by diving inside Lorenzo on the entry to the fast final turn.
It was thought to be the only pass at that turn in any of the three classes on Sunday, but worked perfectly. Lorenzo couldn't use his superior corner speed and almost ran into the back of Rossi's machine at the apex, before crossing the finish line just 0.095sec behind the Italian legend.
“It was to the last breath” said an elated Rossi after his 99th grand prix victory, which he dedicated to his crew chief Jerry Burgess, who mother passed away yesterday.
Meanwhile Lorenzo masked his disappointment and confessed that Rossi “had been braver than him” at the final turn.
Both riders left the pit lane to soak up the applause of the fans before climbing the podium. They deserved it, after providing easily the best race of the 800cc era.
Joining them on the rostrum was an exhausted Stoner, who later revealed he had been getting steadily sicker all weekend. The Ducati star finished 8.8sec behind Rossi but held off Repsol Honda's Andrea Dovizioso by just 0.052sec for his fourth podium of the year.
Dovizioso had been trapped behind fast starting team-mate Dani Pedrosa for the first six laps, then struggled to gain ground of Stoner once released and has now finish fourth in the last three races.
Honda's last MotoGP victory came at the hands of Pedrosa at Catalunya last year, but the Repsol Honda rider needed pain killing injections just to ride this weekend after cracking a thigh bone at Mugello.
After losing out to Dovizioso, the home hero battled Suzuki's Loris Capirossi before eventually finishing 2.3sec behind the GSV-R rider.
Colin Edwards had to recover from another bad start on his way to seventh for Monster Yamaha Tech 3, whilst Randy de Puniet (LCR Honda), Mika Kallio (Pramac Ducati) and Nicky Hayden (Ducati Marlboro) completed the top ten. It was Hayden's best race result of the season, but far lower than he would have hoped for after sixth on Friday.
Sixth on the grid Toni Elias still hasn't finished a MotoGP race at Catalunya after crashing from eleventh place on lap ten, while countryman Sete Gibernau, whose last Catalunya MotoGP race ended with a fractured collarbone in 2006, finished 15th on his comeback from another collarbone break.