The win also won Red Bull Racing its fifth constructors championship and first since 2013.
Verstappen snatched the lead from pole-sitter Carlos Sainz off the line - Sainz was spun out of the race moments later by an errant George Russell - and was on track for a controlled victory until a slow stop late in the race dropped him to third behind Hamilton and Charles Leclerc.
The Dutchman had been struggling with a driveability problem after the race’s second safety car, which was Mercedes’s cue to strike in pit lane with an undercut attempt.
The gamble worked unexpectedly well when Verstappen’s pit stop almost 10 seconds slower owing to a faulty wheel gun, catapulting Hamilton into the lead and generating the conditions for a grandstand finish.
Verstappen had around 20 seconds to recover seven seconds, but he had to get past Leclerc first, and the Ferrari driver and vanquished title contender wasn’t conceding position without a battle.
Verstappen was rebuffed once at the first turn, but he wasn’t to be denied a second time, making an incisive move into turn 11 with 16 laps remaining.
Hamilton was attempting to manage the gap, but his hard tyres couldn’t match the mediums on the rampaging Verstappen’s car, and with seven laps remaining the margin shrunk to a second.
Verstappen made the move on the following tour with a dive down the inside of turn 11. Hamilton attempted to take the wide line, and the former title foes emerged from the corner side by side, but Verstappen’s grippier tyres gave him better traction through the final sector to give him a secure lead.
Hamilton held on ably, but his hard rubber was fading quickly. On lap 53 he made a critical lock-up that dropped him out of DRS range, which let Verstappen escape into the distance to an eventual five-second victory.
“It was all looking good, but the of course the pit stop was a bit longer than we would’ve liked,” Verstappen said. “We gave it everything out there today.”
Verstappen dedicated the victory to team founder Mateschitz, who adapted Thai energy drink Krating Daeng into global energy drink leader Red Bull.
Mateschitz used his fortune to buy the former Jaguar team and turned it into Red Bull Racing in 2004, and the following year he bought the Italian Minardi team and converted it to Toro Rosso, now AlphaTauri, where the likes of Verstappen, Sebastian Vettel, Daniel Ricciardo and Carlos Sainz all made their debuts as part of the Red Bull driver academy.
The energy drink mogul passed away on Saturday after a battle with illness. He was 78 years old.
“It’s a very difficult weekend for us,” Verstappen said. “This one is definitely dedicated to Dietrich himself, for what he has done for everyone.
“The only thing we could do today was win, and even though after the pit stop it wasn’t looking great, I gave it everything out there and I pushed to the limit to come back.
“It definitely means a lot to me, to the team, because he was so important for the whole team, he was so instrumental.
“Of course it’ll all continue, but we really wanted to have a good result today.
Hamilton was upbeat despite being finishing second, noting that his car’s race performance was much improved on much of the season.
“I want to give a big shout-out to my team,” he said. “We came here with upgrades. We closed the gap a little bit. It was so, so close.
“I did everything I could to stay ahead but they were a bit too quick today.”
Leclerc finished third, up from a penalised 12th on the grid with an engine change, though the Monegasque’s recovery only served to demonstrate to him that his car had the pace for more had its started in a representative position.
“I’m satisfied in a way, because we started P12, so a podium is a good achievement,” he said. “But looking at the race, it’s obviously a little bit disappointing.
“We had the pace but had a bit too much [tyre degradation] towards the end of the race.
“We’ll have a look, but in the end P12 to P3 isn’t that bad.”
Sergio Perez finished fourth after a late podium charge fell 0.7 seconds short.
Russell came home fifth after serving a five-second penalty for hitting Sainz at the first corner, dealing the Ferrari terminal radiator failure.
Lando Norris passed Fernando Alonso late in the race to close McLaren’s deficit to Alpine to just 11 points.
Alpine was lucky it wasn’t more after Alonso was sent airborne in a massive crash with Lance Stroll in the middle of the race.
Alonso-rear ended the Canadian, who made a very late jink to the left in defence at one of the fastest parts of the circuit, and was sent airborne.
The Aston Martin was written off, but Alonso’s car was miraculous able to continue to pit lane for repairs, and a feisty recovery drive put him deep into the points.
Sebastian Vettel was a similarly spectacular eighth, having led the race after the safety car deployed for his teammate, only to have his hard work undone by a very slow pit stop that dropped him to 13th.
What followed was a showcase of Vettel’s best racing, with passes on Yuki Tsunoda and Zhou Guanyu, a gutsy pass around the outside of Thai drive Alex Albon and a fiery last-lap battle with Haas driver Kevin Magnussen.
Magnussen finished ninth to score two points for Haas at its home race, and Tsunoda scored the final point for 10th.