Both Atletico goals were a final 10 minutes shocker just crucial minutes before they were about to lose their chance to their city rivals.
In a game of few clear chances, Raul Garcia also received a late red card after a foul and Real chased the win they needed.
Real Madrid’s victory at Athletic Bilbao ensures they are the only challengers to Atletico.
Real Madrid manager said he does not “know what will happen” in the future amid reports of a summer exit.
Real Madrid are sitting in second place and are two points behind leaders Atletico Madrid in the La Liga table.
Real Madrid beat Granada 4-2 on Thursday to keep the pressure on league leaders Atletico Madrid, who beat Real Sociedad 2-1 at home in the other match of the day.
Koke is already a legend at Atletico Madrid and has been crucial to the club's fortunes under Diego Simeone.
Ronald Koeman has admitted that Barcelona's disastrous second half against Levante could cost him his job at the Camp Nou.
Four teams are in the race for La Liga, but only Atletico Madrid depend on themselves to win the competition.
There are still two games to be played, and there is still a glimmer of hope, but matters are now well and truly out of Barcelona’s direct control.