Pedro, Lionel Messi and Andres Iniesta scored the goals that that earned Barca a 14th consecutive league victory, equalling the previous club record set under Frank Rijkaard when they won a La Liga and Champions League double in the 2005-06 season.
The champions moved on to 55 points from 20 games while second-placed Real, who drew in Almeria last weekend, were scheduled to host Real Mallorca on Sunday.
Valencia climbed to third on 40 points after Aritz Aduriz grabbed a last-minute goal to earn his side a thrilling 4-3 comeback win at home to nine-man Malaga. Earlier, Luis Fabiano's hat-trick fired Sevilla to a 4-1 win over Levante that put them seventh with 29 points.
Racing were chasing the game from the second minute after Messi combined with Iniesta in the area and lifted the ball over the diving Tono, for Pedro to chest the ball into the net.
Barca created numerous openings before David Villa was brought down for a penalty in the 33rd minute, which Messi converted, and Iniesta sealed the points with a deflected shot in the 56th.
Racing, who are in the process of being bought out by Indian businessman Ahsan Ali Syed, forced Victor Valdes into a couple of fine saves in the first half but otherwise offered little.
Barca coach Pep Guardiola was unwilling to make title predictions and said Real would take the race to the end of the season. Malaga's new-look side deservedly took the lead at Mestalla when Jose Rondon stroked in an 11th-minute opener, but they were quickly down to 10 men as Martin Demichelis was sent off for tripping Juan Mata in the area.
The Spain winger levelled from the penalty spot, only for Malaga's Rondon to score again from a freekick in the 35th. Valencia were whistled off by their own fans at the break but substitute Roberto Soldado equalised with a low shot soon after the re-start.
Red card
Malaga then lost defender Helder Rosario to a straight red card in the 65th after he shouted at the linesman, and another Valencia substitute Ever Banega fired the hosts in front at a corner two minute later.
Malaga courageously pressed forward and with 10 minutes left Julio Baptista cut inside and drove a fierce shot past Vicente Guaita to level the score at 3-3, only for Aduriz to send them home empty handed with a last-ditch winner.
In Seville, Brazil striker Luis Fabiano scored with a header, a penalty, and a shot from the edge of the area to boost Sevilla ahead of next week's King's Cup semifinal against Real.
Fabiano guided a majestic header into the top corner from a Jesus Navas cross in the 28th minute, and Julien Escude doubled Sevilla's lead at a corner in the 39th.
The hosts went in 3-0 up at the break when Fabiano netted from the penalty spot. Levante pulled one back through Xisco Munoz early in the second half, but Fabiano struck again in the 68th, curling a shot low into the corner to take his tally for the season to eight.