Vinales struggled from pole position in the first Misano race last week owing to an incorrect tyre choice, but a change in approach to set-up in practice meant he was much stronger from the off on Sunday.
The Yamaha rider grabbed the lead from the fast-starting Pramac Ducati of Jack Miller into Turn 4 on the opening lap and opened up a gap of half a second.
Miller’s hopes of a podium quickly faded and he would drop out of the race on lap eight with an engine issue.
Bagnaia on the sister Pramac bike was the rider leading the chase on Vinales by lap two, with the Italian finding a way through on lap six at Turn 4 when the Yamaha rider ran wide.
Using the power of the Ducati and the grip from his soft rear tyre, Bagnaia opened up a lead of over seven tenths, with that advantage growing to over a second a few laps later.
Behind, chaos ensued with KTM’s Brad Binder crashing at the Carro hairpin at Turn 14 on the second tour having just moved into the podium places. Moments earlier, Valentino Rossi (Yamaha) slid out of the top eight at Turn 4 and would eventually pull out.
At the front, Bagnaia’s gap held stable between 1.4s and 1.6s, with Vinales comfortably managing the gap behind to the chasing Pol Espargaro on the KTM and Petronas Yamaha man Fabio Quartararo.
Though the gap had come down to 1.1s by the start of lap 21, Bagnaia still looked in control until he crashed going through the Turn 6 left-hander.
This released Vinales into a commanding lead he would not relinquish through to the chequered flag to become the sixth different winner in 2020 and move right back into championship contention.
The battle for second raged in the closing laps, as Espargaro’s soft rear tyre began to fade and Quartararo hounded him home.
Suzuki’s Joan Mir closed in on this pair having started from 11th and scythed up the inside of Quartararo on lap 23 at Turn 1 for third, before stealing second from Espargaro at Turn 4 on the following lap.
Quartararo followed him through at Turn 4, but was hit with a long-lap penalty on the final lap for exceeding track limits too many times.
The Petronas rider did not take the penalty loop and was hit with a three-second time penalty at the chequered flag, dropping him to fourth and promoting Espargaro to the podium.
Miguel Oliveira came through from 15th on his Tech 3 KTM to complete the top five ahead of LCR Honda’s Takaaki Nakagami and Alex Marquez, who took his best result of the year on the works Honda in seventh.
Andrea Dovizioso holds a slender one point lead over Quartararo in the standings after finishing down in eighth, with just four points now covering the factory Ducati rider, Quartararo, Vinales and Mir.
San Marino GP winner Franco Morbidelli recovered from early contact after Aleix Espargaro crashed into him to finish ninth, with Danilo Petrucci (Ducati), Avintia’s Johann Zarco, Alex Rins (Suzuki) and Aprilia’s Bradley Smith claiming the final points.
Tech 3’s Iker Lecuona crashed out of sixth in the latter stages, with Avintia’s Tito Rabat also crashing and joining Rossi, Bagnaia, Miller, Binder and Aleix Espargaro on the sidelines.