Hamilton reeled off his fourth consecutive podium finish since his debut in Australia to take the lead in the drivers' title race with 30 points, ahead of Alonso on 28, Massa on 27 and Finn Kimi Raikkonen, who retired on the 10th lap with a mechanical problem, on 22.
Hamilton finished 6.7 seconds behind Massa and 10.6 seconds ahead of his team-mate and local hero Alonso in what is a remarkable achievement for the rookie who is the first driver of Afro-Caribbean descent to race in Formula One.
Sunday's race almost turned into a battle of attrition that saw several retirements, however Poland's Robert Kubica held on to finish fourth in his BMW Sauber, Briton David Coulthard was fifth for Red Bull and German Nico Rosberg sixth for BMW.
The Renault of Finn Keikki Kovalainen finished seventh ahead of eighth-placed Japanese Takuma Sato for the rapidly-improving Super Aguri team.
After an aborted start, caused when Italian Jarno Trulli stalled his Toyota on the grid, Massa made an excellent beginning, sweeping away from his third successive pole position to take the lead into the first corner, closely followed by Alonso.
First corner collision
Double champion Alonso made a robust challenge to force his way past the Brazilian as they rounded turn one, but Massa defended equally which the Spaniard resented.
"I thought I was very much in front of him in the first corner, and he didn't think so, and we touched each other. It was dangerous and we were lucky to finish," said a sad-looking Alonso afterwards.
"We were very lucky because 99 percent of the time in incidents like that you would finish the race in the first corner. I had braked late and I thought I was in front. He just did not think so."
Very tight
Massa retorted: "It was very tight. I went inside and we went for it."
"It was very close for both of us in the first corner and it was important. I didn't want to lose it like (I did) in Malaysia. I was on the inside and I wanted to stay there," added the Brazilian.
"We touched, it was not too strong. He was trying to push me inside. It was a small contact, but fortunately nothing happened.
"I was on the inside and I don't understand what he means. He was more aggressive than me."
Massa established a big lead over Hamilton after 26 laps with an advantage of more than ten seconds, and after an exchange up front due to pit stops, the Brazilian again pulled away to win comfortably.