Pep Guardiola's men pulled off a come from behind victory 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 equalized 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 10th successive La Liga win.
The Aragons 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 hit the ball in the wrong direction, 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 defense 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 was 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 Minero, 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 its 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 goal-wards from 15 yards out that was brilliantly tipped around the post by Roberto.
The visitors then put the result beyond doubt on 86 minutes after Paredes brought down Alexis in the box. Messi stepped up to slam the ball past a helpless Roberto to score his 60th of the season, before Pedro made it 4-1 in injury time following the Argentine's assist.
Guardiola's side entertains Getafe on Tuesday evening in La Liga while Zaragoza face a tricky away trip to Sevilla two days later.