Alonso, who has won two previous F1 races, was aided by Sebastian Vettel's late-race accident, in which he lost power after starting on the pole and leading for two-thirds of the 49-lap race.
Alonso used the opening to pass Vettel and take the lead for good.
"It's a special day for me," Alonso said. "Obviously, coming back to the podium always is special, and it's even more special with Ferrari, with the history behind the team and the expectations a driver has when he drives for Ferrari. There's no better way to start the relationship."
Massa's second-place finish came in his first event after returning to racing from head injuries suffered in a high-speed qualifying crash in Hungary last July.
Benedict Cumberbatch's dramatic reading of R. Kelly lyrics is just what you need
Kate Middleton recycles dress at movie premiere