Pep Guardiola's side came from behind to earn all three points against the relegation strugglers, who played half the game with only 10 players
Despite missing a penalty just six minutes previously, Carlos Aranda gave the home team the lead on the half-hour mark. However, Carles Puyol equalised on 36 minutes before Messi put Pep Guardiola's men in front just three minutes later as Zaragoza were forced to play the whole of the second half with 10 players after Abraham Minero's sending off for two bookings.
Messi scored a late penalty with four minutes to go before Pedro grabbed a fourth as Barcelona wrapped up their ninth successive La Liga win.
The Aragonese outfit made a positive start to proceedings and should have taken the lead in the fifth minute. Ruben Micael found himself clear on the left side of the Barca box and was able to square the ball to Aranda, only for the striker to inexplicably mis-hit it, sending his effort away from goal.
The Blaugrana struggled to create chances in the early stages and were given an almighty fright when Victor Valdes brought down Angel Lafita in the box to give away a penalty on 23 minutes, just seconds after Aranda had struck the post. The striker was the man to step up to take the spot-kick but his tame effort was parried away by Valdes.
Despite the disappointment of his penalty miss, it was Aranda who grabbed the opening goal of the game on the half-hour mark. Pablo Alvarez's through ball seemed to catch the Barca defence out as Aranda raced clear of Javier Mascherano. The Spanish striker's initial effort was poor as Valdes blocked the ball but he managed to head the rebound into the net.
However, Barca were level just six minutes later and had some nightmare goalkeeping from Roberto to thank. The former Benfica shot-stopper spilled Cesc Fabregas' corner allowing Puyol to poke the ball home from 12 yards out.
The Catalans then completed an amazing three-minute turnaround when they took the lead on 39 minutes. Hitting Zaragoza on the counterattack, Alexis Sanchez' cross-field pass found Messi who sidestepped Paulo da Silva before thrashing the ball into the top corner from 15 yards out for his 59th goal of the season in all competitions.
Just before the break, the home side's evening went from bad to worse when they were reduced to 10 men. Abraham, who has already been booked, earned his second yellow of the evening for tripping Alexis after the Chilean had sped past him on the right wing.
Barcelona looked far from convincing in the early stages of the second half but could have extended their lead on 63 minutes. Alexis received a pass from Messi before showing some quick feet to get the better of Javier Paredes and slamming a low effort goalwards from 15 yards out that was brilliantly tipped around the post by Roberto.
Dani Alves limped off with a minor injury with 20 minutes to go, but Guardiola's side put the result beyond doubt on 86 minutes after Paredes was adjudged to have brought down Alexis in the box. Messi stepped up to slam the ball past a helpless Roberto to score his 60th goal of this season. The Argentine then turned provider in injury time when his pass found Pedro, who beat Roberto in a one-on-one to put the icing on the cake.
Guardiola's side entertain Getafe on Tuesday evening in La Liga while Zaragoza face a tricky away trip to Sevilla two days later.