Madrid captain Ramos was substituted in last week's home defeat to Cadiz and missed the subsequent shock reverse against Shakhtar Donetsk in the Champions League as the Spanish champions crept towards a crisis ahead of their first meeting with Barca this season.
But the centre-back was fit to start for the crunch LaLiga clash at Camp Nou and drew a second-half spot-kick from Clement Lenglet to restore Madrid's lead after Ansu Fati had cancelled out Federico Valverde's opener in a frantic start.
Luka Modric then preyed on a Neto error in the 90th minute to secure the points and take Zinedine Zidane's men top, earning back-to-back LaLiga wins against their fiercest rivals for the first time since May 2008 - the last time they successfully defended their domestic title.
Meanwhile, Barca are now without a win in three in the league and sit six points back in mid-table under new coach Ronald Koeman.
3 - Zinedine Zidane is unbeaten in his six Clásicos at Camp Nou as @realmadriden manager in all competitions (W3 D3). Only Miguel Muñoz (7) has won more away Clásicos for Real Madrid than him (3) in all competitions. Smile. pic.twitter.com/ZMI6EnFnRV— OptaJose (@OptaJose) October 24, 2020
The first chance of a gripping game brought the breakthrough as Karim Benzema played a patient pass through for Valverde to advance and lift a cool fifth-minute finish over Neto into the top-left corner.
Vinicius Junior blasted off target as Madrid sought a swift second, but instead they were pegged back three minutes after going ahead when Jordi Alba raced in behind Nacho and squared for Fati to tap in.
Thibaut Courtois and Neto denied Lionel Messi and Benzema respectively at either end as an even, entertaining first half finished all square, before Barca started strongly in the second period.
Fati shot across the face of goal and then Philippe Coutinho aimed a header wastefully wide from the goalscorer's pinpoint cross.
But Lenglet's foolish, off-balance tug on Ramos encouraged an extravagant fall, alerting the VAR to the foul and allowing the visiting skipper to slide his spot-kick beyond Neto.
The embattled Neto made a smart double-stop from Toni Kroos and somehow blocked Ramos' volley, but his valiant efforts to keep Barca in the game were undone when he spilled the ball at the feet of Rodrygo, who squared for fellow substitute Modric to calmly prod into the net.
What does it mean? Advantage Madrid after tough week
Even with the season still in its infancy, recent results meant a victory either way in Catalonia would have a huge bearing on the mood music heading into the rest of the campaign.
Madrid therefore emerge surely in pole position to win a second straight LaLiga crown, having triumphed in the first Clasico of the season at Camp Nou for the first time since December 2007.
For Barca, the misery that set in at the end of last season shows no sign of shifting. They had 60 per cent of the possession in the second half on Saturday but could not muster a single shot on target.
Leading by example
Ramos' return did not fix all of Madrid's problems and right-back remains an issue, with Nacho surviving just 43 minutes, three fouls and a booking before he was substituted.
But the captain remains as influential as ever. He showed his experience in winning the penalty and then settled into a trademark defensive effort prior to the third goal, making three tackles, four clearances, three interceptions and a block in all.
Letting the side down
The Blaugrana were on top when Lenglet's misstep handed Madrid complete control. The foul - one of three from the Barca defender - initially went undetected, but Ramos was always likely to make the most of such contact in the box and it proved costly.