Barca stretch lead at summit
World Player of the Year Messi conjured a magical headed goal, his 26th strike this season, to set depleted Barca on their way to victory while their second-placed rivals were denied by a post and some resolute defending in La Coruna.
Barcelona now have 68 points from 25 matches while Jose Mourinho's Real side are on 61.
Barca made light of the absence through injury of playmaker Xavi, centre-back Carles Puyol and goalkeeper Victor Valdes as forwards David Villa and Pedro scored their 17th and 13th goals of the season to add to Messi's effort.
Mallorca coach Michael Laudrup played for Barcelona in the 1990s with the Catalan club's current coach Pep Guardiola and Barca had never beaten a La Liga team coached by the former Danish international, who also had a stint in charge at Getafe.
The teams drew 1-1 at the Nou Camp in October, one of only three matches in which Barca have dropped points this term.
Laudrup's players made a good job of closing their opponents down in the early stages at their Estadi Iberostar before Messi opened the scoring in the 38th minute.
Seydou Keita scooped the ball over the defence and Messi controlled it once with his head to take it away from the defender and, without letting it bounce, nodded it over Mallorca's Israel goalkeeper Dudu Aouate into the net.
It was the Argentina international's 26th of the season in La Liga and put him two clear of Real forward Ronaldo at the top of the scoring chart.
Sergio Busquets split the defence to send Spain team-mate Villa clear to round Aouate for Barca's second in the 57th and Pedro cut in from the left and scored with a dipping shot to make it three in the 66th.
Barcelona are now unbeaten in their last 19 away matches, equalling a La Liga record set by Basque club Real Sociedad in the 1979/80 campaign.
Real's expensively assembled forward line, including Cristiano Ronaldo, Kaka and Karim Benzema, struggled to penetrate a well-drilled home defence at a boisterous Riazor.
Ronaldo and substitute Emmanuel Adebayor hit shots against the post in the frantic latter stages and Benzema fluffed Real's best chance late on when he failed to connect with a Ronaldo centre just a couple of metres from goal.
Portuguese coach Mourinho gave a characteristically theatrical display on the touchline, stalking his technical area and berating the fourth official.
"Obviously it's a step back," Real goalkeeper and captain Iker Casillas said in a television interview.
"We tried our best and created some good chances but the ball just wouldn't go in," he added.
"Now we have to think about the Malaga game (on Thursday) and how we can catch the leaders."
Earlier, Atletico Madrid and Sevilla missed a chance to breathe life into their European qualification hopes when they drew 2-2 at the Calderon.
The two clubs were touted as possible challengers to the domination of Barca and Real in Spain's top flight but erratic recent form had pushed them out of the European places.
Atletico twice came from behind to salvage a point at the Calderon, but the draw will do little to ease the pressure on coach Quique Sanchez Flores.
Espanyol climbed above Athletic Bilbao into fifth when they thumped visiting Real Sociedad 4-1, while strugglers Sporting Gijon and Real Zaragoza drew 0-0.
Depor are a shadow of the side that won the league in 2000 and the draw with Real leaves them only three points above the relegation places in 13th.