Gareth Bale came off the bench to score his 100th goal goal for Real Madrid, as Santiago Solari's side moved ahead of rivals Ateltico Madrid in the La Liga table.
Real Madrid move up to second, with Diego Simeone's team slipping down to third, after suffering back to back defeats in league action for the first time this season.
Casemiro opened the scoring for the visitors after 16 minutes, acrobatically volleying home Sergio Ramos' knock down from a corner.
Atletico hit back ten minutes later, as Antoine Griezmann raced onto Angel Correa's pass and slotted through Thibaut Courtois legs. The referee did opt to consult VAR to check for an offside against the Frenchman, but he was just on the right side of the visiting defence.
VAR was at the centre of more controversy four miuntes before the break, as the referee deferred to the technology after Jose Gimenez fouled Vinicius Junior inside the area.
The video referee upheld the initial decision, and Ramos buried his eighth penalty of the season for Real Madrid, to send them into the break 2-1 ahead.
The second half turned on two decisive moments, firstly Alvaro Morata saw his first goal as an Atletico Madrid player ruled out, as the referee again went to VAR – and the Chelsea man was ruled to be fracctionally offside.
That seemed to take the wind out of the home side's sails, and Simeone was unable to summon a repsonse from his players.
And when Solari introduced Bale for the final half hour, the stars appear to align for the Welshman's centenary goal – which duly arrived on 74 minutes, as he calmly slotted past Jan Oblak, from Luka Modric's clever pass.
Atletico were reduced to ten men in the dying stages as Thomas Partey recieved a second yellow card for a lunge on Toni Kroos, to end a miserable day for Los Rojiblancos.