The opening strike of the entertaining 10-goal affair came just 13 minutes in, as Ballon d'Or holder Ronaldo powered home his first of the evening from Marcelo's cross.
Getafe, who came into this contest on the back of a seven-game winless run, turned the match on its head thanks to two quickfire goals in the Spanish capital.
Madrid were always likely to pose an attacking threat for the remainder, however, and so it proved when Ronaldo found the bottom corner from his 32nd-minute free kick to level things up once more.
The Portuguese was at it again less than two minutes later, this time converting a penalty for goal number 61 of the campaign after Javier Hernandez was brought to ground.
Hernandez himself should have edged Madrid ahead shortly before the interval when meeting a low cross into the box which was blocked behind, and it proved costly when Medhi Lacen remarkably added the first half's sixth goal, lashing home a loose ball to level up at 3-3.
The second 45 minutes was all about Madrid, though, with Hernandez drilling the ball beyond Jordi Codina to restore their lead shortly before James Rodriguez joined the party by tucking away a free kick of his own.
Jese looked to have put the icing on the cake 19 minutes from time when linking up with James and curling home goal number six, but there was still time for Marcelo to wrap up an emphatic win from close range.