The reigning world champion Sebastian Vettel came home fourth after adopting a different tyre strategy, while his Red Bull team-mate Mark Webber failed to finish.
Jenson Button, of McLaren, was fifth, and 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.
Hamilton’s lead from pole position lasted only into lap five, when Alonso activated his DRS on the home straight, sneaking on the Briton’s outside, then Alonso’s team-mate Massa shot down Hamilton’s inside.
Next 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.
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, the two-time world champion, 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, narrowly beaten to the world title last season by Vettel, 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 podium place