Ronaldo and Higuain keep Real on course
Ronaldo netted from the penalty spot in the first half and Higuain raced clear to double the lead in the 76th minute, but there was little else of note in a low key game.
"The important thing was to win. It wasn't brilliant, but we were very solid at the back," Real coach Manuel Pellegrini told reporters.
Real moved on to 77 points with eight matches left to play, ahead of Barca on goal difference, after the champions swept aside sixth-placed Athletic Bilbao 4-1 on Saturday.
With Real notching up their 12th straight league victory and Barca having only lost once all season, next Saturday's 'Clasico' at the Bernabeu is being seen as crucial to the outcome of the title.
The head-to-head record between the sides decides first place if they end up level on points, and Barca hold the edge after a 1-0 win at the Nou Camp in November.
Ronaldo was brought down as he dribbled into the area after 23 minutes at the Sardinero, and the Portuguese forward scored from the ensuing penalty.
Racing, 17th in the 20-team league, offered little in response though youngster Sergio Canales, who has been signed by Real for next season, came closest to levelling when his lob bounced just wide of the post.
Real made sure of the points when Alvaro Arbeloa sent Argentine Higuain through for his 24th league goal, and Guti and Ronaldo both went close to adding to the score in the closing stages.
Earlier, Spain striker David Villa scored twice in the last five minutes to help keep Valencia on course for next season's Champions League with a 3-0 win at home to Osasuna.
Winger Joaquin struck just after the break at Mestalla and Villa scored in the 89th and then again from the penalty spot in time added on, to take his tally for the season to 20.
Third-placed Valencia have 56 points from 30 games, eight ahead of Sevilla in fourth, and moved a step closer to securing Spain's last automatic Champions League qualification place.
Real Mallorca needed a late goal from Pierre Webo to grab a 1-1 draw away to Almeria, that put them level on 48 points with Sevilla, but fifth due to their inferior head-to-head record.
Villarreal are seventh on 43 points after a 2-0 win away to troubled Real Valladolid and Diego Forlan scored in his fifth consecutive game as Atletico Madrid beat eighth-placed Deportivo La Coruna 3-0 to go 10th on 40.