The drivers' championship will be settled next week in Sao Paolo, Brazil, after Red Bull's Vettel finished second and Ferrari's Fernando Alonso third.
"Wicked!" said Hamilton, who pumped his fists, waved to the crowd and danced a jig on the nose of his car after his fourth win of the season. "This is one of the best, if not the best Grand Prix, we've had all year."
Vettel started the race in the pole position and led the first 41 laps before Hamilton caught him, sneaking past Vettel just before they reached the tight corner on turn No. 12 at the Circuit of the Americas. Hamilton started in the No. 2 position and pushed Vettel at every opportunity.
"It was a close fight with Lewis. He had one chance and took it. There wasn't much between us," Vettel said.
Vettel, the defending two-time Formula One champion, remains slightly ahead of Ferrari's Alonso in the drivers' championship, meaning the title will come down to the final race of the season.
Hamilton, who won the last U.S. Grand Prix, talked all week about how much he loves the United States and how badly he wanted to win in his return.
With the stars and stripes of the American flag painted on top of his helmet, Hamilton pulled off the daring move of the race with his pass. Vettel had been dominant in practice and qualifying on the new $400 million track that none of the teams had driven before this week, but couldn't hold off the former world champion Sunday.
Vettel survived the chaos of the start as the drivers reached the top of the 133-foot elevation at the signature first turn, then whipped around and down into the second before hitting a series of curves.
Vettel kept clear of the congestion and looked to be off and running to a victory. But Hamilton kept looking for his chance on every pass through the straightaway before he finally found the room he needed.
"I knew that lap was going to be the lap that I was going to try, so I turned the engine up and went for it," Hamilton said.
Alonso had to work hard to keep up and keep the chase for the drivers' championship going.
Alonso was set to start in eighth. He got a boost to seventh when Ferrari broke the gearbox seal of Alonso's teammate, Felipe Massa, incurring a five-spot penalty for Massa that allowed Alonso to move up.
"The reason for this was for strategy considerations, with the objective of maximizing Alonso's start potential given that he's still in with a chance to win the drivers' championship," Ferrari said in a statement. "It was a decision agreed by both drivers."
Alonso used the better position to immediately advance three spots on the first lap. He ran into trouble with a bad pit stop when his crew struggled to replace his rear left wheel, but made up enough ground to finish third.
"Today it was not possible to keep pace (with the leaders)," Alonso said. "They were too far ahead."
Vettel still leads the drivers' championship race by 13 points. The 25-year-old German would be just the third driver to win three consecutive titles, joining Juan Manuel Fangio and Michael Schumacher.
Alonso, 31, of Spain, won consecutive titles in 2005 and 2006.
"We try to look at Brazil with a possibility to fight for a world championship," Alonso said.