Australian MotoGP: Marc Marquez secures 11th win of the season
Vinales was leading for much of the race before Marquez darted past him in the closing stages.
In a bid to retake the lead he skidded out, leaving Marquez to secure his fifth win in a row.
"It was an incredible, incredible victory," said Marquez.
"Today we were not the fastest on the racetrack. Maverick was fastest but I was waiting for him. I did a strong move to pass - it was the only chance for me."
Marquez, 26, who secured his sixth world title by winning in Thailand earlier in October, became Honda's most successful ever premier class rider with his 55th win, surpassing Australian great Mick Doohan.
Britain's Cal Crutchlow, who suffered career-threatening injuries at the race last year, came second on his LCR-Honda, with Australian Jack Miller third on a Ducati.