Messi and Helder Postiga each struck two goals in seven first-half minutes as Barcelona maintained their 100 per cent start to the season.
The Argentinian had given Barca a 3-0 lead and, despite Postiga cutting the gap to just one goal before half-time, Los Che could not find an equaliser.
Cristiano Ronaldo scored his first goal of the season as Real Madrid made it three wins out of three by comfortably seeing off Athletic Bilbao 3-1 at the Bernabeu.
Midfielder Isco opened the scoring in the 26th minute and Ronaldo headed in a free-kick just before half-time. Isco then struck again midway through the second half while Ibai Gomez scored a consolation goal for the visitors, who never really got into the game.
Atletico Madrid survived a late onslaught from Real Sociedad to claim a 2-1 win and also maintain their 100 per cent winning start to the season.
David Villa and Koke scored either side of half-time to give Diego Simeone's side a two-goal lead, which was reduced by a late strike by Xabi Prieto.
Atletico goalkeeper Thibaut Courtois then had to make two stunning saves in the final moments of the game to preserve all three points.
Kevin Gameiro scored two goals as Sevilla twice came from behind to draw 2-2 with Malaga.
Pedro Morales put Malaga ahead five minutes before the break but just four minutes later Gameiro had them level.
Roque Santa Cruz then fired the visitors back in front in the 68th minute but once again it took just four minutes for Gameiro to even things up as he earned Sevilla a point.
In the day's other game, Real Betis picked up their first point of the season after holding Espanyol to a goalless draw at the Estadi Cornella-El Prat.