Enea Bastianini completed the podium at Assen.
Polesitter Bagnaia led from the start on his factory Ducati to ride a flawless race, capping a memorable weekend after his success in Saturday's sprint race.
Giving a riding masterclass, the rider from Turin further reduced Martin's lead to 10 points in his quest for a third straight world title.
"It's incredible. I had to push from the start and suffering a bit from the rear tyre. But lap-by-lap I improved," Bagnaia said.
"We were very fast, very precise... I am very satisfied," said Bagnaia, who twice broke the Assen track record over the weekend.