Barcelona's Uruguayan striker Luis Suarez opened the scoring with a well-taken goal shortly after the second half resumed, and it looked as it would be the only strike until Ramos' headed equalizer with time running out.
The gap between the two still stands at six points, with Luis Enrique's Barca yet to wrest back control of its destiny.
The arch-rivals took to the pitch on a bright, chilly December afternoon in what will likely prove to be a decisive match in the Liga season.
Real were favorites going into this edition of the Clasico, coming off the back of a series of six consecutive wins in the league, highlighting the difference with an unusually stuttering Barcelona team which, before today, had dropped four of the last 15 points
Real Madrid coach Zinedine Zidane praised the late fightback, telling journalists that it was emblematic of "the heart of this team."
He told journalists he was "content" with the point, but "nothing more" than that.
The result sees an end to his six-match win streak in the league, but a point away at Los Blancos' fiercest rivals, and an unchanged points advantage at the top of the table, ultimately represents a positive result for the Frenchman.
Real did indeed look the brighter of the two teams for much of the match, but Barcelona's MSN trio -- Messi, Suarez and Neymar -- were in fine form and the game took on a renewed urgency just eight minutes after the restart, with Luis Suarez heading home a free kick from strike partner Neymar to open the scoring.
The visitors desperately tried to enact a late comeback and Ramos headed over in the 87th minute, and Ronaldo followed up with a shot into the side netting shortly after before Ramos' late equalizer.
Andres Iniesta came on in the 59th minute, replacing Ivan Rakitic, to a huge swell of applause, the little playmaker making his return after over a month on the sidelines. He hit the side netting in the 69th minute but ultimately couldn't find the net on his return.
The second half increasingly belonged to Barca and it looked like the Catalans were headed for a historic win over the visitors from the capital until the late, late strike by Madrid's captain which stretched his side's unbeaten run to 33 games.
Ronaldo, Messi held
Madrid's talismanic striker Cristiano Ronaldo, who last month committed his future to the club for a further five years, put in a spirited performance, forcing a couple of fine saves from Ter Stegen early on but his influence waned in the second half.
His opposite number, Lionel Messi, desperately needed to break his duck against Real, having not scored against the team in five meetings. He came close 15 minutes from time but ultimately couldn't convert and looked crestfallen at the late turn of events to deny his side victory.
Barca manager Luis Enrique knows the scale of the task now facing his team to overhaul Real's lead in the standings and was left to rue their missed opportunities.
"Right now there is a solid leader that have gone many games without slipping up," he said.
"They have the resources and variety in their play to keep picking up points.
"We need to improve, above all, our numbers at home."
Game in mourning
The game came after a devastating week for world football, following the tragic deaths of several playing and non-playing staff of the Brazilian club Chapecoense
Real Madrid held a minute's silence before training on Tuesday for the tragedy that befell Chapecoense -- one of many around the world. Two Brazilians started the match at the Camp Nou -- Neymar for Barca and Marcelo for Real.
The teams joined arms behind a "Fuerza Chapecoense" banner ahead of the match as the crowds observed a moment's silence.
The kickoff came as the stricken Brazilian team held a memorial service in their stadium,
the Arena Condá stadium in Chapeco.