Hamilton had a trip across the grass at the start of the race and fell to fifth but executed a one-stop strategy brilliantly to overhaul both Ferraris and score his 10th victory of the season.
Sebastian Vettel was unable to attack Hamilton after losing track position through strategy and had to settle for second in lead Ferrari, with Valtteri Bottas third.
Poleman and early race leader Charles Leclerc fell to fourth as a two-stop strategy cost him dearly.
Ferrari had control of the race in the early stages despite Leclerc being lightly nerfed by Vettel after running wide under braking for the Turn 4 left-hander and slowing right down through the tight right-hand turn that followed.
Behind, though, Hamilton had already suffered an early setback as Max Verstappen challenged him on the inside into the first corner.
Hamilton had already been crowded out by Vettel on the run down to Turn 1, a move he branded “dangerous” but one that was not investigated by the officials.
At the first corner, Hamilton ran wide and had a big snap of oversteer on the outside kerb, which lurched his car to the right and put him and Verstappen on the grass between the Turns 2 and 3 complex.
The incident dropped Hamilton to fifth behind Alex Albon’s Red Bull and the McLaren of Carlos Sainz, while Verstappen fell to eighth, behind Lando Norris and Bottas.
Hamilton passed Sainz into Turn 1 on lap four then ran fourth through the rest of his opening stint, which he extended to lap 23 – eight more than race leader Leclerc and nine more than Albon, both of whom committed to a two-stop strategy.
However, Vettel – who assumed the race lead when Leclerc stopped – and Bottas extended their first stints 13 and 14 laps longer than Hamilton respectively.
Hamilton’s early stop allowed him to jump Vettel for track position, although the major tyre offset meant the five-time world champion was fearful he would not be able to defend once Vettel pitted.
However, by the time Leclerc and Albon had made their second stops and left Hamilton leading the race from Vettel, Hamilton kept his pursuer more than two seconds behind for the next 20 laps.
During that time, Bottas closed right up onto the back of Vettel, while Leclerc used his fresher tyres after his second stop to hack into the gap to the one-stopping trio ahead.
With 12 laps to go Leclerc had almost hauled himself within DRS range of Bottas but locked his front-left tyre into Turn 4 and ran wide, which doubled his deficit to the Finn.
Ahead, Vettel closed to within two seconds of Hamilton for the first time with eight laps remaining, but Hamilton hit back immediately and continued to keep the Ferrari out of range.
Hamilton’s win, with Bottas third, extended his championship by 10 points but he needed to add 14 points over Bottas to clinch his sixth title.
That means Hamilton, who now has a 74-point lead with 78 available in the final three races.
Behind the top four, Albon was fifth after arguably his strongest performance for Red Bull, with teammate Verstappen fighting back to sixth after a mammoth 66-lap stint on hard tyres.
Verstappen’s race was wrecked early on when, after being forced off by Hamilton, he suffered a right-rear puncture shortly after lunging Bottas for seventh into the stadium section.
He hobbled back to the pits with the tyre stripped from the rim of his Red Bull and dropped to last, before gradually rising back up the order with no further pitstops and supreme tyre management.
Home favourite Sergio Perez resisted a charging Daniel Ricciardo to secure best-of-the-rest honours in seventh place.
Nico Hulkenberg was poised to finish ninth in the second Renault, but was hit into a spin by Daniil Kvyat on the final lap and rear-ended the barriers.
Kvyat claimed ninth ahead of teammate Pierre Gasly but was handed a 10-second penalty after the race, dropping to 11th behind Hulkenberg.
McLaren looked on course for another best-of-the-rest victory early on but Sainz faded badly after switching to hard tyres, to the point he stopped again to switch to mediums and wound up 13th.
Teammate Lando Norris retired after a forlorn attempt to continue once his race was ruined by McLaren releasing him with a wheel improperly attached.