Atletico Madrid then backed up their encouraging performance against Manchester United in the Champions League by beating Celta Vigo 2-0 to go fourth, above Barcelona. Renan Lodi scored twice at the Wanda Metropolitano.
Benzema struck in the 83rd minute, his 29th goal of the season enough to seal a scrappy victory at Vallecas but one that could put Madrid almost out of sight if Sevilla fail to beat local rivals Real Betis on Sunday.
Betis sit third and have been in excellent form in recent weeks.
For an eighth match in a row, Madrid failed to score in the first half and this was their fifth game out of the last six that has seen them unable to score more than once.
Their lack of creativity could prove problematic against more testing opponents, with a Champions League second leg against Paris Saint-Germain and then the Clasico against Barcelona both approaching next month.
“We knew it would be a difficult game,” said Carlo Ancelotti. “We won but I’m not very, very satisfied.”
Benzema returning to peak fitness and form would certainly help and the Frenchman looked sharp again after recently recovering from a thigh injury.
Also encouraging was his combination for the goal with Vinicius Junior, whose scintillating form has faded in recent weeks. “They combine so well,” said Ancelotti. “Real Madrid is lucky to have these two players.”
A superb start to the campaign had Rayo in the hunt for the European places a few weeks ago but five consecutive defeats has seen them drop to 12th.
They pushed Madrid hard but were made to pay for a lack of quality in the final third, which Benzema and Vinicius ultimately provided.
Marco Asensio and Benzema both had early chances but Rayo were the better team in the first half, drawing Madrid into a scrap and harrying them into mistakes.
Casemiro was particularly out of sorts but thought he had given Madrid the lead, banging a bouncing ball into the net after winning an aerial duel with Alejandro Catena.
The goal was ruled out after replays showed he had pushed Catena in the back.
Both teams had chances early in the second half. Vinicius’ finish from six yards was blocked before Thibaut Courtois did brilliantly to deny Mario Saurez from heading Rayo in front.
Rayo tired and Madrid turned the screw in the last 20 minutes although Rayo had the best chance, Oscar Trejo and then Alvaro both thwarted by Courtois after Madrid failed to clear.
The miss proved costly because moments later, Benzema was celebrating in the corner.
He started the move, threading Vinicius through in the box before continuing his run. Vinicius could have shot but tapped it to his left, giving Benzema an open net.
Atletico moved three points clear of Barcelona, who play the first of two games in hand against Athletic Bilbao on Sunday.
Lodi, who provided a superb cross for Joao Felix’s goal against Manchester United on Wednesday, completed a remarkable week by scoring twice.
First, he fired in at the near post after some quick feet in the box and then he latched onto Geoffrey Kondogbia’s ball over the top and fired in a second.
“He is very dangerous, he can score, he can break but the most important thing about him is what you don’t see — how he gets on with his teammates, how he trains, how he commits,” said Atletico coach Diego Simeone.
Atletico have now registered two clean sheets in their last three games after managing none in their previous seven.
“The team has a different spirit, a different aggression, we are much faster in transition, more forceful,” said Simeone. “The results are coming.”