driver in 23 years of racing at Barcelona's Circuit de Catalunya to win from outside the top three grid positions.
Alonso, who won in Barcelona with Renault in 2006 and also in Valencia last year at the European Grand Prix, took the chequered flag 9.3 seconds ahead of 2007 world champion Kimi Raikkonen in a Lotus.
The Spaniard, who started in fifth place with the Mercedes duo of Nico Rosberg and Lewis Hamilton locking out the front row, seized third place through the third corner and had the crowd roaring him on as he led after 13 of the 66 laps.
"It was fantastically emotional and the fans really helped because you feel the support from everyone," said Alonso after doing his slowing down lap with a Spanish flag handed to him by a marshal.
"We have only had five races and there have been some ups and downs but we know we have the car to fight with the top cars and if we do well we can compete for the championship."
Raikkonen, in the points for a 22nd successive race and now just two short of Michael Schumacher's all-time record, denied Ferrari a one-two finish with Brazilian Felipe Massa taking a distant third.
Red Bull's triple world champion Sebastian Vettel was fourth, 38.2 seconds behind Alonso, and saw his overall lead over Raikkonen cut to four points. After five of the 19 races, the German has 89 points to Raikkonen's 85 and Alonso's 72.
Hamilton slipped to fourth overall with 50 points after spending the afternoon falling through the field as Mercedes - as expected - again failed to live up to their electrifying qualifying pace.
The 2008 world champion ended up out of the points in 12th and was even heard exclaiming that he had been overtaken by a Williams — driven by last year's winner Pastor Maldonado — as a measure of how much he was struggling.
"It was way too tough," he told the BBC.
"We have got a lot of work to do. We both went backwards, but I went back a long, long way and I don't know why. We will keep going back to the drawing board and see what we can do."
Former champions Williams have failed to score a point in five races with a car lacking aerodynamic performance and Venezuelan Maldonado, who finished 14th after a drive-through penalty, had started way back in 17th place.
In a race dictated by the quick-wearing tyres, Alonso pitted four times — the same as Vettel and Massa — while Raikkonen made only three trips to the pitlane.
Rosberg, who had also been on pole at the previous race in Bahrain where he finished ninth, led for the first 10 laps before facing up to the inevitable.
The German, sixth at the finish behind Red Bull's Mark Webber, was not to lead again as Mexican rookie Esteban Gutierrez took over at the front for two laps in a Sauber amid the pitstops before Alonso asserted himself.
Britain's Paul Di Resta was seventh for Force India with McLaren's Jenson Button eighth after starting 14th. Mexican team mate Sergio Perez was ninth and Australian Daniel Ricciardo 10th for Toro Rosso.
Alonso wants more
Fernando Alonso warned on that despite his victory, Ferrari are still behind rivals Red Bull and Lotus in terms of sheer pace and performance.
The 31-year-old Spaniard, who won his two world titles with Renault, said he felt that he was in his best position to take the title since joining Ferrari, but they still have a lot to do.
Alonso said: "Probably yes it is in terms of the performance of the car, although we should have won the championship in 2010 I believe, when we arrived in Abu Dhabi eight points ahead of Seb...
"But we lost there and it's nothing we can change now. Last year we didn't win - we were one second off, but we managed to fight until the Brazil race.