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.