The 36-year-old won a classic battle with MotoGP's young champion Marc Marquez, keeping control after their bikes touched and cutting across the gravel at the final chicane of the last lap to stay in front.
The Italian clinched his 111th victory at the top level, delighting the crowd of 97,000 as he extended his championship lead to 10 points over Yamaha teammate Jorge Lorenzo.
"I learnt some motocross from Rossi today," said Marquez, who returned to form after using an older model Honda in the race, having crashed in practice on the 2015 version.
"The whole race I focused on studying the last chicane perfectly, I knew where to put the bike to limit his space but I didn't think he'd cut the corner," added the 22-year-old, who is 74 points behind Rossi as he seeks a third successive title.
Rossi, whose 100th victory came at the Dutch circuit in 2009, started the race in pole position as he sought to end Lorenzo's run of four successive wins this season.
"I had good speed and saw I could put some distance between Jorge and I. Unfortunately this pace wasn't enough to get away from Marc," he said.
Marquez took the lead, but Rossi reclaimed it as they headed for the finish.
"We touched so I had to cut the corner and I was lucky to control the bike on the gravel," said Rossi, seeking to win his first world title since landing his seventh in 2009.
"I think it was a great battle, as the last time we fought he won."
Lorenzo started in eighth place, and the Spaniard had to make do with third -- 14.5 seconds behind Rossi, and almost five ahead of Ducati's fourth-placed Andrea Iannone.
"I tried to keep up with the pace of Valentino and Marc, but they were really strong and I realized that today was not the day," said Lorenzo, the world champion in 2010 and 2012.
"Today was the day to fight and keep this third place, which is very good for the championship."
Who will win the MotoGP title? Tell us on CNN Sport's Facebook page