Alexis Sanchez put hosts Barcelona ahead with a free header from Dani Alves' cross towards the end of the the first half, sending rock-bottom Deportivo towards a seventh defeat in eight games.
And Messi, on as a substitute shortly after the hour, added a delicious second after 87 minutes to put the result beyond doubt, exchanging passes with Alves before chipping the ball delicately over goalkeeper Daniel Aranzubia to score for the 17th league game in succession.
Malaga failed to take the maximum points off Valladolid at the Jose Zorrilla stadium, and the 1-1 draw could see them slip out of the Champions League places by the end of the weekend.
Manuel Pellegrini fielded an under-strength side, presumably with the club's Champions League last-16 second-leg match with Porto on Wednesday in mind, resting Isco and Joaquin.
His team got off to a great start when Martin Demichelis headed them into the lead after eight minutes, but Manucho equalised for the hosts shortly before half-time.
Rayo Vallecano moved to within two points of the Champions League places after a convincing 2-0 win at home to Espanyol.
An early goal by Chori Dominguez gave the Madrid-based side the perfect start and Piti wrapped up the points by netting after 77 minutes.
Alejandro Alfaro gave Real Mallorca's survival hopes another boost as his two goals helped see off Sevilla 2-1.
A week after he scored his first league goal of the season as Mallorca came from behind to win at Granada, the forward netted in each half to move his side up to third bottom, just one point from safety.
Alvaro Negredo briefly levelled for Sevilla just after the hour mark, but, with the lively Giovani Dos Santos causing plenty of problems, the hosts fully deserved their win.
They finished the match with 10 men after the sending off of Javi Marquez for a second yellow card in the third minute of stoppage time, but by then the work was done.
Celta Vigo are at home to Real Madrid and Los Blancos are expected to field an under-strength side for the encounter on Sunday night.
Madrid secured passage to the quarter-finals of the Champions League with a 3-2 aggregate win over Manchester United earlier in the week.
Coach Jose Mourinho is likely to rest several key players and can expect an easy time out against 18th-placed Celta in Sunday's fixture at the Balaídos Stadium. They will still be optimistic of securing a win and keeping pace with Barcelona, who secured an easy 2-0 win over Deportiva la Coruna earlier on Saturday.
Elsewhere, Atletico Madrid were given a boost this week ahead of their match against Real Sociedad when coach Diego Simeone agreed a new four-year deal with the club.
The news comes after speculation has linked the former Argentina international with a high-profile summer move after his successes at Atletico, which include winning the Europa League and the UEFA Super Cup in the first six months of his tenure
The Rojiblancos are currently second in the La Liga standings, 11 points behind Barca but two ahead of Madrid rivals Real.
Atletico left-back Filipe Luis hailed Simeone's new contract.
He told Marca: "The coach not only tells us how we have to play, but also how we should feel at the club. Football is a state of encouragement and Simeone has won me over."
Also on Sunday, Athletic Bilbao take on Valencia in the early kick-off before Levante host Getafe while Real Zaragoza host Granada on Monday.
On Friday, Real Betis secured a 2-1 win over Osasuna to move up to fifth for the time being.
Friday's La Liga Result
Saturday's La Liga Results
Sunday's La Liga Fixtures
Monday's La Liga Fixture
Zaragoza vs Granada