A brief statement from the Spanish football federation said that the defender was suffering from "severe discomfort in his right hamstring."
Ramos -- who became the most capped European player ever on Saturday, breaking Italy keeper Gianluigi Buffon's record -- was featuring in his 178th international.
"I had to take Raphael off because he had a little problem," Les Bleus coach Didier Deschamps said.
The extent of Ramos' injury will be assessed on Wednesday, when the 34-year-old will undergo further tests, but Spain manager Luis Enrique said he empathises when clubs see their star players go down during international duties.
"[Ramos and Sergio Canales] are muscular injuries, we don't think they're too serious, although it's annoying for the clubs when a player gets injured with the national team, I know what it's like. We hope they aren't out for too long," the ex-Barcelona boss said after the match.
Spain's medical team want to see how Ramos' injury evolves overnight before making a definitive diagnosis, but the absence of him and Varane will undoubtedly give Madrid manager Zinedine Zidane some heartburn.
Ramos now looks certain to miss his club's La Liga match with Villarreal on Saturday. Ramos would then face a race to be fit for a crucial Champions League clash away at Internazionale next Wednesday.
As well as Ramos and Varane, Madrid are also currently without third-choice centre back Eder Militao, who tested positive for the coronavirus on Nov. 2.
If the absence of all three is confirmed, that would leave Nacho Fernandez -- only just back from injury himself -- as the club's only available senior central defender this weekend.