Cristiano Ronaldo scored a scrappy opener and a winner from the penalty spot, after Iago Aspas' equaliser, to take his tally to 188 goals in 186 appearances for the club.
Celta substitute Park Chu-young headed against the crossbar late on but Real held on for victory.
Real moved to second in the standings above city rivals Atletico Madrid, who were beaten 1-0 at home by Real Sociedad.
Xabi Prieto scored the only goal after 53 minutes to inflict a sixth loss of the season on their opponents.
Iker Muniain scored his first goal of the season as Athletic Bilbao overcame Valencia 1-0 at San Mames to record a victory that eased their fears of being dragged into a relegation fight.
Levante missed the chance to move closer to the Europa League places as Getafe survived a one-sided goalless draw at the Ciutat de Valencia.
Visiting goalkeeper Miguel Moya deserved praise for keeping Robert Acquafresca and Pedro Rios at bay in the first half but in truth, ninth-placed Getafe were lucky to escape with a point.
Saturday Results Round-up
Lionel Messi kept up his scoring run in La Liga as Barcelona strolled to a 2-0 win over Deportivo La Coruna on Saturday evening.
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.
Friday's La Liga Result
Saturday's La Liga Results
Sunday's La Liga Results
Monday's La Liga Fixture