The deserved victory was the 39-year-old Finn’s first since the Australian Grand Prix of March 2013, a gap of 113 races dating back to when he was racing for Lotus, and 21st of his career.
Red Bull’s Dutch youngster Max Verstappen finished a surprise second after starting 18th in a thrilling finale with the top three cars running nose-to-tail and separated ultimately by just 2.1 seconds at the chequered flag.
Ferrari’s Sebastian Vettel, Hamilton’s only title rival, spun down to 15th on the opening lap but fought back to finish fourth – a result that means the championship remains open going into Mexico next weekend.
Hamilton, on 346 points, now has a lead of 70 over his four-times champion rival with a total of 75 remaining to be won from the last three races.
That means even if Vettel wins in Mexico, the Briton need finish only seventh to be sure of the title but Sunday was still a missed opportunity for Mercedes who might have won with a better strategy.
“I actually thought we would have been able to do better but this is the best we were able to do in the end,” said Hamilton. “We just have to keep working and keep pushing for the next race.
“I’m not really quite sure how the strategy ended up like that,” added the Briton, who had started on pole position but lost the lead to Raikkonen into the first corner at a sunny Circuit of the Americas.
He then pitted early during a virtual safety car period but had to make two pitstops to his rivals’ one, losing time on fading tires before being called in.
He then staged a late charge over the final 19 laps from fourth with 12 seconds to make up.
Team mate Valtteri Bottas helped by letting him through for third place, but the Finn then lost out to Vettel as his tires wore down and finished fifth.
Hamilton, a second behind Verstappen at the end, went wheel-to-wheel with the 21-year-old with two laps left but failed to make the move stick and ran wide at turn 18 in his last chance to grab second.
“Did you win the championship?” enquired 2007 world champion Raikkonen, whose last previous win with Ferrari was in 2009. “No,” replied Hamilton.
The Mercedes driver had looked set to wrap things up when Vettel, starting fifth, spun on the opening lap after making contact with Red Bull’s Daniel Ricciardo in the battle for fourth place.
It was the second time in two races that the German had come off worse against a Red Bull – at the previous race in Japan he had started eighth, dropped to 19th after a collision with Verstappen and fought back to sixth – and he seemed to have handed the title to Hamilton.
Instead, he staged a solid recovery drive to delay the inevitable.
“I’m happy for Kimi, really. Tough weeks for the team and the tough times don’t seem to be stopping for me. It should have been a better day,” said Vettel.
Renault’s Nico Hulkenberg finished sixth, ahead of Spanish team mate Carlos Sainz, with Force India’s Esteban Ocon eighth.
Kevin Magnussen gave US-owned Haas some points in their home race with ninth, ahead of Force India’s Mexican Sergio Perez in 10th.