Karim Benzema opened the scoring at the Vicente Calderon but Koke and Gabi turned the game on its head with goals just before the break.
Real looked like suffering their second derby defeat of the season - it would have been a first Atletico double since 1951 - until Cristiano Ronaldo forced home an equaliser with eight minutes remaining.
Had Ancelotti's men not salvaged the 2-2 draw, Barcelona would have taken over at the top following their 4-1 home victory over Almeria, and Real's coach therefore cut a relieved figure.
He told realmadrid.com: "We drew a game that we were losing.
"The response was good and overall we can be satisfied because Atletico are a good team, particularly at home.
"We're top and that's good.
"A point is a point. It was a difficult match.
"We tried to play but it wasn't easy because Atletico played a very rough game. They tried to impose a violent game. We don't play like that.
"We tried to play and in the end we did it."
Real director Emilio Butragueno described the match as "electrifying" and felt Los Blancos could have won had Benzema and Ronaldo tucked away promising chances in the second half.
"It was an electrifying match," he said.
"In the first half, Atletico pressed very well. The match was being played more or less in the area of the field where they wanted it and we suffered a lot.
"They scored at the end of the first half, but in the second half, as the game progressed, we took control of the situation.
"We took possession of the ball and we could have won. There was a very dangerous header from Cristiano and a good chance for Benzema."