Lionel Messi equalled Alfredo di Stefano's record of 18 'Clasico' goals with an 18th-minute La Liga leveller after Karim Benzema's opener for hosts Real in the sixth minute.
But that was scant comfort for league leaders Barca, dumped out of the King's Cup by their arch rivals 4-2 on aggregate on Tuesday.
Third-placed Real's victory does little to affect the title race, leaving them 13 points behind Barca with 12 matches left, although it represents another big psychological boost ahead of Tuesday's last 16, second leg at Premier League leaders United.
Real's trip to Old Trafford - last month's first leg at the Bernabeu finished 1-1 - is the club's overwhelming priority and coach Jose Mourinho left key players including top scorer Cristiano Ronaldo and midfielders Xabi Alonso, Sami Khedira and Mesut Ozil out of his starting line-up on Saturday.
It was a strangely low-key affair for a clash between the Spanish giants - the 225th meeting between the sides - and both teams appeared content to settle for a 1-1 draw until Ramos leapt to head home a Luka Modric corner in the 82nd minute.
The Barca players were furious when their penalty appeals for an apparent Ramos foul on Adriano were waved away in the dying seconds and goalkeeper Victor Valdes was shown a yellow card and then a red moments later for furiously berating the referee after the whistle.
It was perhaps a sign of the pressure Barca are under after they followed up a 2-0 defeat at AC Milan last month, which left them on the verge of Champions League elimination, with two defeats to Mourinho's side.
"Winning the league was more impossible when we were 16 points behind but as long as it's not mathematically ruled out Madrid has the obligation to keep fighting," Ramos told Canal Plus television.
"After two consecutive 'Clasico' victories we are going to Manchester convinced we can get through but without being disrespectful to United."
Stuttering Barca were looking for revenge after Real ended their treble hopes on Tuesday but fell behind when Benzema was left unmarked at the far post and clipped an Alvaro Morata cross into the net.
Messi equalised when he got the better of Ramos and sent a low shot past Diego Lopez for his 50th goal of the season in all competitions.
The Argentine has now scored in a record 16th straight La Liga appearance, taking his tally to 39 for the season, and also netted his 18th goal in his 25th appearance against Real, equalling former Madrid great Di Stefano's record set in the 1950s and 60s.
Ronaldo came off the bench with half an hour left and the in-form Portuguese stung Valdes's hands with a powerful free-kick before Morata was denied by the Barca keeper in a one-on-one after he was played through by Pepe.
After Ramos nodded the home side in front, Ronaldo curled another free-kick against the post, narrowly failing to score an 11th goal in his last 11 'Clasicos'.
Valencia, who seek to overturn a 2-1 deficit when they travel to Paris Saint-Germain in the Champions League on W
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.