The 35-year-old started behind Yamaha team-mate Jorge Lorenzo and Italy’s Andrea Iannone on the grid, but powered home in Misano for his 81st career win.
Rossi’s previous triumph was at Assen in Holland in June last year.
The nine-time world champion finished ahead of Spaniard Lorenzo, with Honda’s Dani Pedrosa in third place, while runaway championship leader Marc Marquez finished way down in 15th place.
Marquez, starting from the second row for the first time this season as he chased a 12th win in 13 races, failed to recover from an early crash.
Spaniard Marquez saw Pedrosa cut his lead in the overall standings from 89 to 74 points, with Rossi now only one point further behind in third place.
It was the first time a Honda rider had failed to win a MotoGP round this season.
Rossi and Marquez were involved in a duel from the start before the 21-year-old Spaniard lost control on lap 10, his Honda sliding out from beneath him with 19 laps to go.
Oxford’s Bradley Smith, 23, and fellow British rider Cal Crutchlow, 28, finished seventh and ninth respectively.