
The evergreen 38-year-old Italian beat compatriot Danilo Petrucci, on a non-works Octo Pramac Ducati, to second place by a mere 0.063 with rain midway through the race making conditions tricky.
Triple world champion Marc Marquez was third for Honda.
Rossi has now been a winner across all classes for longer than any other rider in the history of motorcycling.
His victory on Sunday comes 20 years and 313 days since his first in what was then the 125cc category.
The Italian now has 115 Grand Prix wins across all classes, second only to compatriot Giacomo Agostini’s 122 victories between 1964 and 1977.