Vettel, who started from pole, took the checkered flag ahead of Hamilton but there was no celebration in the Ferrari garage as the furious German was demoted to second after being slapped with the penalty for a dangerous re-entry after running off the track.
Under pressure from Hamilton, Vettel threw away the race on lap 48 when the German went too hard into the turn-three chicane and ran on to the grass, returning to the track just ahead of the Briton who was forced to brake sharply or face being pushed into the wall.
The race continued with the incident under investigation and a few laps later when Vettel was told of the decision the four-time world champion exploded, venting his anger over the team radio.
"I had nowhere to go. Seriously, I had nowhere to go," fumed Vettel. "They are stealing the race from us."
At the same time, Mercedes were telling Hamilton to just "stay in Vettel's gearbox" and take a gifted victory.
"Not the way I wanted to win," said Hamilton, after collecting his fifth win of the season and equalling Michael Schumacher's Canadian record.
The decision to penalize Vettel allowed Mercedes to extend their season-long domination, making it seven wins in seven races.
Unhappy Ferrari took the other two places on the podium, Vettel in second and team mate Charles LeClerc third.
After the race Vettel jumped out of his car and headed straight to the stewards' office where he no doubt made his feelings clear again.
When he emerged, he walked past the parked cars and removed the number one marker in front of Hamilton's Mercedes, replacing it with the number two. (Editing by Clare Fallon)