La Liga: Barcelona 5 Espanyol 1
Luis Enrique's men were punished for a sluggish start as Barca academy product Sergio Garcia gave the visitors an early lead, but the hosts eventually found their rhythm and La Liga's record goalscorer Messi struck three times in another comprehensive victory.
Espanyol had not scored at Camp Nou since another La Masia graduate, Ivan de la Pena, netted twice in a 2-1 win back in February 2009.
However, Garcia ended that five-match drought in the 13th minute and Espanyol continued to pose a significant danger on the counter-attack.
Barca eventually levelled just before the interval, however, as Messi curled a delightful strike past Kiko Casilla and he completed the turnaround early in the second period, with Gerard Pique swiftly adding a third.
Espanyol never posed any threat of a comeback of their own, and Pedro got his name on the scoresheet with 14 minutes left before Messi subsequently completed his hat-trick soon after, ensuring Barca close back to within two points of pacesetters Real Madrid.
The warning signs were there for Barca early on, though, as Garcia flashed a cross in from the left and only a last-ditch Jordi Alba intervention denied Lucas Vazquez an easy finish.
But clinical visiting play saw Espanyol seize the initiative as Felipe Caicedo robbed Sergio Busquets on the right flank, and fed Garcia, who breezed past Pique before executing a low finish past Claudio Bravo.
Garcia could only fire tamely at Bravo as Espanyol threatened to double their lead, but it only seemed to spur Barca on further as Messi struck the crossbar with a 30-yard free-kick, before Luis Suarez fired just wide.
And with home pressure building before the break, Messi bent an unstoppable effort into the bottom-left corner from 25 yards to restore parity on the stroke of half-time.
The visitors were somewhat lucky not to be reduced to 10 men in the 49th minute as Eric Bailly barged Neymar over with the Brazilian through on goal.
But it mattered little to Barca, who edged themselves ahead a minute later.
Messi's first touch from Suarez's pass was heavy, but he reacted quickly to poke the ball through Juan Fuentes' legs and then stroke right-footed past Casilla from the edge of the area.
And their third arrived shortly after, Pique atoning for his role in Garcia's opener as he headed Ivan Rakitic's corner into the net.
With the result already in little doubt, substitute Pedro latched on to Alba's exquisite cross-field pass before coolly slotting beyond Casilla in the 77th minute and Messi completed the rout four minute later.
The Argentinian combined brilliantly with Pedro, playing a one-two into the area before steering into the net from 10 yards, securing his third hat-trick in four games and maintaining Barca's dominance over their near neighbours.