A sixth consecutive La Liga victory took his side four points clear of Barcelona in the title race.
Ramos coolly passed the ball into the net to finally break the deadlock in the 79th minute after Dani Carvajal was felled by the trailing leg of Getafe’s Mathias Olivera, who was denied a penalty earlier on after being knocked over by Carvajal.
The late strike felt harsh on Getafe, who had squandered a couple of chances to take the lead, but Zinedine Zidane’s side once again saw out a difficult game to capitalise on Barca’s 2-2 draw with Atletico Madrid on Tuesday.
Real, who have not won the title since 2017, lead the table on 74 points ahead of second-placed Barca with five games left.
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies