The Australian needed to score 15 points more than Rossi to secure the crown with four races in hand but the Ducati rider had to settle for third place behind the Italian and Spain's Dani Pedrosa.
Stoner now has 287 points, 76 more than Rossi.
"It was an amazing race. It was a great battle with Dani (Pedrosa) especially, and with Casey (Stoner). Today everything worked well", said the jubilant Rossi, who retired from the previous race in Italy.
"Once again we've shown that when the tyres are working well we can fight at the top," added the former champion.
"It was fantastic fun to ride like this again, at the maximum and with a lot of good passing."
Rossi, using a new specification Yamaha engine, overtook Honda's Pedrosa on the final lap to win in 45 minutes 49.911 seconds at the slowest circuit on the calendar.
Pedrosa clocked 45:50.086 with Ducati rider Stoner third on 45:51.388. Outgoing world champion Nicky Hayden of the United States, who started on pole position, was fourth on a Honda on 46:02.862.
VICTORIOUS ROSSI
It
Stoner's fourth successive podium finish, and 11th top three result in 14 races, came despite a clutch problem that slowed his challenge.
"I'm happy with the result but we did have higher expectations going into this race," said the 21-year-old.
"We thought we had a pretty good set-up but unfortunately I started having a problem with the clutch about five laps into the race.
"There was no engine braking so I couldn't try and brake as late as the other guys without running wide into the turns," added the Australian.
Rossi dedicated his victory to former world rally champion Colin McRae, who was killed in a helicopter crash in Scotland on Saturday.
"Colin is one of my idols from when I was very young and it's because of him that I have my passion for rally," he said. "It's a very sad day for motorsport and I am glad that I could win for him today."