To get his fourth Formula One victory this season, Hamilton had to overtake the German with seven laps remaining.
He had dominated the race in its early stages, but bypassed a pit stop chance after a Timo Glock crash disabled the safety car.
The move cost Hamilton his 16.9-second margin over Ferrari's Felipe Massa with 31 laps left.
Later, he re-established his momentum and won the race with a strong finish.
"I would have much preferred to have come in earlier (for my second pit stop) but the way it worked out I knew I had a lot of work to do," Hamilton said.
Massa, Nick Heidfeld and Heikki Kovalainen completed the top-five finishers.
Hamilton assumed the lead in the F1 standings with 58 points to 54 for Massa.
2014: NFL Cheerleaders [PHOTOS]
Michael Sam cut from the Dallas Cowboys