Tata Martino's men looked set to drop two points in the Catalan derby but their talismanic No.10 converted a 77th-minute spot kick to send his side to the summit of the standingsBarcelona defeated city rivals Espanyol 1-0 to go back on top of La Liga.
The champions' challenge was reignited last weekend with a 4-3 Clasico win over Real Madrid and although they did steal a slender win at Cornella-El Prat, their fellow Catalans represented stern opposition until a late red card.
Both sides wasted numerous chances during the first half, with Neymar missing the best opening in the 19th minute as be blasted over from point-blank range.
With less than 20 minutes to go, Gerard Pique looked to have spurned a match-winning opportunity as he hit the crossbar, but a couple of minutes later, Messi netted a crucial spot kick after a Javi Lopez handball.
Espanyol's hopes of a late fight-back were all but vanquished in the 83rd minute as goalkeeper Kiko Casilla received a red card for handling outside the area, and Barcelona held on comfortably to reach 75 points.
Gerardo Martino compared Espanyol to title rivals Atletico Madrid in the build-up and he subsequently refused to rest a host of key players, despite facing Diego Simeone's men in the Champions League on Tuesday.
The home side did their best of living up to that praise early on as former Barca attacker Sergio Garcia fired narrowly wide from 20 yards, but Jose Manuel Pinto – deputising for the injured Victor Valdes – never looked overly worried.
Barcelona grew into the encounter and went close twice in quick succession just before the 20th minute; Lionel Messi first heading onto the roof of the goal, before Neymar skewed over from five yards after the Argentina star's cross.
Although the hosts were dominating possession, Espanyol looked threatening on the break.
Pizzi exploited space in the Barcelona defence when on the counterattack 21 minutes in, but he blazed over after bursting into the area.
Martino's men ended the first half under pressure, but Neymar almost produced a moment to celebrate as he poked agonisingly wide of the right-hand post after collecting Jordi Alba's through-ball.
Proceedings were considerably less frantic at the start of the second period as Barcelona became more focused defensively, seemingly sacrificing some attacking potency in the process.
With just over 15 minutes remaining, Pique flicked a corner on to the crossbar, but they were not denied a few moments later.
Lopez handled the ball inside the penalty area and Messi coolly slotted away the resulting spot kick for a goal that could have huge title ramifications come May.
Things got even worse for the home side with seven minutes to go as Casilla rushed out to meet Messi and he earned himself a straight red for handball, forcing midfielder Lopez to go in goal due to all substitutions being used.