A charging Sebastian Vettel came fourth, just 0.2 seconds behind Hamilton, after adopting a different tyre strategy from most of his rivals, while his Red Bull team-mate Mark Webber failed to finish on a dreadful weekend for him.
Jenson Button, of McLaren, was fifth, and Alonso's team-mate Felipe Massa sixth.
Daniel Ricciardo, of Toro Rosso, Force India's Paul di Resta, Romain Grosjean of Lotus and Nico Hulkenberg, of Sauber, rounded out the top 10.
Ferrari's Alonso said he was delighted to get his season back on track after retiring early in Malaysia last month. The two-time world champion was second, behind the rejuvenated Raikkonen, in the season-opening race in Melbourne.
"It feels good, it is a long time from my victory here eight years ago," said the Spaniard, who narrowly lost out to Vettel for the world title last season.
"It was not easy to understand this race sometimes, not an easy race. The risk is there when you overtake.
"This is a good reward for the team after the disappointment in Malaysia. Let's hope this is now the start of the championship and we need to keep going like that."
Hamilton, whose lead from pole position lasted only into lap five, when Alonso activated his DRS on the home straight, just held off the rampaging Vettel at the line to earn a second podium place for his new team.
"I'm really happy with today's result and very happy for the team. We didn't quite have the pace of these two (Alonso and Raikkonen) but we're very pleased to get on the podium."
Hot pursuit
In warm and dry conditions, and in front of a packed grandstand – not always the case at the Chinese Grand Prix – the race got off to a clean start.
Pole-sitter Hamilton streaked to the corner with Alonso, third on the grid, in hot pursuit. Raikkonen, who was starting in second, was slow out the blocks.
But there was soon drama, as Sauber's Esteban Gutierrez slammed into the back of Adrian Sutil, of Force India. Flames licked from the right side of Sutil's machine as engineers battled to save his race. But both cars were out.
Vettel, who started ninth on the grid, was moving ominously up the field.
Likewise Webber, who started the race from the pits after a disastrous qualifying session. That run to the front was curtailed though on lap 16 when Jean-Eric Vergne, of Toro Rosso, cut across him.
Webber suffered damage to the front of his car and was called into the pits. But shortly afterwards the Australian inexplicably lost a right-rear tyre. Several cars had to swerve as the tyre rolled across the track.
Webber's bad weekend was over.
Raikkonen was in the thick of it, suffering slight damage when Sergio Perez, of McLaren, attempted to snuff out the Finn's overtaking manoeuvre. "What the hell's he doing?!" exclaimed the straight-talking Raikkonen over the team radio.
"I was surprised there was not more damage," the Finn, a big favourite with the Shanghai crowd, said later.
"I hit him quite hard, and was also surprised I didn't have more problems. It was a good fight for second place and quite a good result in the end."
Hamilton's team-mate Nico Rosberg, winner in Shanghai last season, was the next to retire, as Button, Alonso and Vettel all had turns in the lead.
Twenty laps to go and Raikkonen and Hamilton were also still in the hunt.
Alonso surrendered his lead – nearly 20 seconds by then – to Vettel when he went in for a change of tyres. But the Spaniard snatched it back again on lap 43 of 56, darting inside the Red Bull.
Alonso was in full flow now, clocking the fastest lap time of the race, as Vettel, the rampaging Raikkonen and Hamilton scrapped it out for the other two podium places.
But Vettel still needed to pit again. On lap 52 he did so, rejoining the action in fourth, as he attempted to chase down a spot on the podium. – Sapa-AFP