Barca took another stride towards retaining their league title but were made to work by La Liga's rock-bottom team, who took a shock lead before succumbing to their hosts.
Barcelona had to come from behind to dispose of lowly Almeria 3-1 as the reigning La Liga champions head towards yet another title. An unexpected opener from Corona was cancelled out by a Messi penalty before Thiago nodded the Catalans infront and Leo sealed the victory with a late strike.
Los Rojiblancos made a gutsy start to the game, beguising their position at the foot of the Liga table, as they kept Barca at bay for the opening 15 minutes. However the home side soon quickened the tempo and found their feet as Thiago fired over wastefully after some tricky dribbling by Bojan.
Messi then had two chances, the first poached from nothing as he thumped his shot wide but his second was a characteristically mesmeric run as he danced past three challenges. Unfortunately his outside of the boot finish went the wrong side of the post as the Camp Nou crowd expected the diminutive forward to put the Andalucians to the sword.
Although Almeria hung on during a sustained period of pressure, a clean sheet was obviously not the only objective today. Ortiz and Piatti combined efficiently but the latter could not latch onto the return ball to work Pinto in the Barca goal.
The opening half ended goalless but Diego Alves in the away side's goal kept it so as he amalgamated with the post to keep Messi out once more as the FIFA Ballon d'Or winner threatened again with another captivating run.
A whirlwind beginning to the second half livened up a fruitless encounter as David Villa hit the post following the best move of the game for Barcelona. However Almeria shell-shocked the home crowd by going up the other end immediately after and taking the lead.
The Andalucians broke at pace and Piatti's perfectly weighted through ball found Corona unmarked and he slotted the ball into the net past Pinto in the 50th minute.
Unfortunately for the visitors, goalkeeper Diego Alves made a rash decision a short time after taking the lead by clipping Villa in the box and a penalty was awarded. Messi sent the 'keeper the wrong way with a calm finish to the bottom right corner to level matters in the 53rd minute.
The brave rearguard of Almeria was broken once again when Thiago scored in the 64th minute. The Catalans took the lead when the 19 year-old glanced in a header from Messi's corner past a despairing Alves.
The effort put in by Los Rojiblancos was telling by now as the Blaugrana teased the opposition by playing keep ball. Chances were at a premium in the closing stages as Xavi, Inista and co. retained the ball efficiently. And it was Messi who put the icing on the cake as he made it 3-1 when he pounced on a missed headed clearance by Marcelo, cut inside the defender before dinking his shot over Diego Alves.
The victory was a perfect reply by Barcelona to Real Madrid's 3-0 win over Athletic Bilbao in the earlier kick-off as the gap between the teams is kept at eight points.
Barca will travel to Shakhtar Donetsk on Tuesday for the second-leg of the Champions League, before returning to Spain to take on Los Blancos in a potential title-deciding El Clasico on April 16.