Real is second on 37 points from 17 matches, one behind Barca which hosts Leganes on Sunday when Atletico, in third on 35 from 16 games, welcomes Getafe. Rayo is 13th with 20 points.
Real Madrid paid for defensive mistakes as it was held to a 3-3 draw at lowly local rival Rayo Vallecano on Saturday, missing the chance to move above leader Barcelona La Liga.
Real is second on 37 points from 17 matches, one behind Barca which hosts Leganes on Sunday when Atletico, in third on 35 from 16 games, welcomes Getafe. Rayo is 13th with 20 points.
Already missing France captain Kylian Mbappe with a leg muscle injury, Real manager Carlo Ancelotti decided to rest talisman Vinicius Jr from the start and Rayo Vallecano took a two-goal lead in the first half thanks to mistakes.
Rayo stunned the champion with a goal after four minutes on the counter when Jorge de Frutos ran past Fran Garcia before crossing to the unmarked Unai Lopez, whose header at the far post beat goalkeeper Thibaut Courtois.
Vallecano extended its lead when Abdul Mumin was left alone behind Lucas Vazquez and nodded home from a corner in the 36th.
However, a thunderous Federico Valverde strike from long-range got Real back in the game three minutes later, with Rodrygo finding Jude Bellingham, who netted a first-time effort from inside the box to level.
Rodrygo almost scored with an angled shot that forced a reflex save from Augusto Batalla just after the break.
But the Brazilian was not to be denied and in the 56th minute, gave Real the lead with a deflected strike from the edge of the area.
Ancelotti brought on Vinicius Jr to provide a spark Real was missing, and Batalla made a fine save to deny him, with Arda Guler having a goal ruled out for offside minutes later.
Real looked in control and appealed for a penalty for a foul on Vinicius Jr, which was waved away before Rayo stunned the defending champion again when Isi Palazon moved between defenders Antonio Rudiger and Aurelien Tchouameni to deflect a cross into the net.
Ancelotti’s side tried to push for the win, but Batalla denied efforts from Vinicius and substitute Endrick, with Rudiger missing a clear chance late on as Real had to settle for a draw that could prove costly in the title race.