Barca bounce back to sink Sevilla
Real had earlier slumped to a 1-0 defeat at Athletic Bilbao, goalkeeper Gorka Iraizoz pulling off a string of superb saves to deny the visitors' expensively-assembled strikeforce after Fernando Llorente's third-minute opener.
With just under half the season gone, unbeaten Barca have 46 points from 18 matches, Real are on 41, and Valencia, who host local rivals Villarreal on Sunday, are third with 35.
"Athletic are a very strong side and they knew very well how to defend the lead they managed to get so early in the game," Real coach Manuel Pellegrini said at a news conference.
"We had five or six clear chances but we lacked precision and were missing a bit of luck," he added.
"There is a long way to go in the league and there are 60 points still to play for so nothing is decided."
Holders Barca were ousted from the King's Cup by Sevilla on Wednesday and Pep Guardiola's players looked hungry for revenge at a rainy Nou Camp.
Zlatan Ibrahimovic, Thierry Henry and Messi all went close before Sevilla defender Julien Escude diverted a Rafael Marquez cross high into his own net in the 49th minute.
A perfectly weighted, defence-splitting pass from midfielder Xavi released substitute Pedro with 20 minutes left and his delicate chip beat advancing Sevilla goalkeeper Andres Palop.
Messi, who grabbed a hat-trick at promoted Tenerife last weekend, finished from close range in the 85th and then raced on to an Eric Abidal pass in the first minute of added time to score his 14th goal of the campaign, two more in the scoring charts than nearest rival David Villa of Valencia.
Bilbao had stormed out of the blocks at their packed and intimidating San Mames stadium earlier on Saturday and midfielder Carlos Gurpegi and striker Gaizka Toquero were denied only by the woodwork inside the first minute.
Shell-shocked Real were behind two minutes later when Lassana Diarra could only head a Fran Yeste corner into the path of Llorente and the unmarked striker stooped to nod the ball past keeper Iker Casillas.
Karim Benzema, Cristiano Ronaldo and Kaka -- who together cost Real almost 200 million euros in the close season -- had numerous chances to level.
France forward Benzema came closest when his low shot bounced back off the inside of the post in the 34th minute.
Gaps were opening up in the visitors' defence as Real pushed forward in search of an equaliser in the second half and a defensive slip almost let in Llorente for a second in the 88th but his shot was beaten away by Iker Casillas.
Iraizoz made his best save of the match in the first minute of added time when he flung himself acrobatically to tip away a powerful Ronaldo drive.
The Portugal forward ended a frustrating night when he sent a freekick sailing over the bar into the jubilant home crowd.
In the early kick-off, Juanfran and Walter Pandiani struck inside the first 10 minutes to