James Rodriguez’s stunning dipping volley a minute before the break lit up an otherwise drab first 45 minute.
Mauro Dos Santos’s own goal doubled Madrid’s advantage early in the second-half before Alvaro Arbeloa added a late third.
Madrid travel to Champions League-chasing Sevilla on Saturday before facing Juventus away in the first-leg of their Champions League semi-final on Tuesday.
“We are in a very important part of the season and every game is the most important,” said Madrid boss Carlo Ancelotti.
“I will play the strongest team against Sevilla despite the fact we then play against Juventus.
“We are not convinced that Barca will drop two points, but we are that we are going to win the four remaining games.”
The pressure was on Ancelotti’s men after Barcelona had mauled Getafe 6-0 on Tuesday, but they made a slow start against the relegation-threatened Andalusians.
Rodriguez headed just wide from Arbeloa’s cross early on before Ruben Martinez stood up well to turn a fierce drive from Cristiano Ronaldo behind.
The World Player of the Year also sent a dipping free-kick onto the roof of the net, but the home fans were becoming frustrated before Rodriguez sparked the game into life just before the break.
In a similar style to the Colombian’s stunning volley against Uruguay at last year’s World Cup, he slammed the ball over the helpless Martinez from just outside the area.
It was 2-0 three minutes into the second-half as Jese fed Toni Kroos down the right and his low cross was turned into his own net by Dos Santos with Ronaldo waiting to pounce.
Rodriguez was then withdrawn for Isco in preparation for the week ahead.
However, the hosts still dominated the final half hour and should have added to their lead when Raphael Varane headed just wide before Javier Hernandez failed to continue his scoring streak when he turned Ronaldo’s low cross wide at the near post.
Hernandez did have a hand in the third goal though as his cross was slotted home by Arbeloa.
Atletico Madrid remain on course to finish third after Fernando Torres came off the bench to claim all three points in a 1-0 win at Villarreal.
In a game of few clear-cut chances, Torres took advantage of a slip from Eric Bailly to run clear on goal and kept his side to slot home just his second league goal since returning to his boyhood club in January.
Sevilla remain six points behind Atletico, but did move up to fourth with a 3-1 win away at struggling Eibar to move up to fourth.
Carlos Bacca struck twice inside the first 15 minutes to give the visitors a commanding advantage and Jose Antonio Reyes rounded off the scoring after Federico Piovaccari had pulled a goal back for the Basques.
Celta Vigo maintained their push for a Europa League place as Nolito’s late winner handed them a 1-0 win over Malaga.
At the bottom Elche took a huge step towards securing survival as they moved six points clear of the relegation zone thanks to a 4-0 thrashing of Deportivo la Coruna.