The Portugal star lashed out late, but the Wales winger won a penalty and scored it himself to snatch all three points.
Ronaldo was given a straight red card for striking a Cordoba defender with the score deadlocked at 1-1 eight minutes from time at the Estadio Nuevo Arcangel on Saturday.
But Bale bailed out his teammate when he converted from the penalty spot in the 89th minute after his own free kick had been handled — with Cordoba's Federico Cartabia receiving a second booking for that violation.
Real moved four points clear of Barcelona ahead of the Catalans' trip to Elche later Saturday, but Carlo Ancelotti will be concerned by his side's performance and the fact Ronaldo — who cut a frustrated figure throughout the clash — could now face a three-game ban for violent conduct.
Real endured a dreadful start as Nabil Ghilas confidently converted from the penalty spot after Sergio Ramos handled Bebe's shot just three minutes in.
Cordoba's confidence continued to grow after it had taken the lead, with Bebe, Ghilas and Cartabia looking particularly threatening on the counter. Manchester United flop Bebe almost put the hosts two goals to the good in the 18th minute, firing just wide of the post following a driving run into the penalty area.
Despite appearing somewhat rattled by Cordoba's bold approach, Real eventually restored parity through Benzema just before the half-hour mark. The France striker stabbed home from close range after James Rodriguez's corner was flicked on by Bale.
Real struggled to build upon its equalizer, however, with its star-studded frontline having little luck carving out clear-cut chances against a well-organized Cordoba defense.
Ancelotti failed to inspire an improvement with his halftime words, as Cordoba remained just as threatening going forward.
In fact, the hosts appeared the more composed of the two sides in attack and came close twice in quick succession in the 56th minute. Cartabia first smashed a fierce effort just wide of the top-left corner from 25 yards, before Bebe fired straight at Iker Casillas after a strong solo run.
The best chance came 12 minutes later, though. Florin Andone pounced on Raphael Varane's weak header and looped an effort over the approaching Casillas, but the ball bounced up and hit the bar.
Cordoba appeared set to earn a well-deserved point when Ronaldo was dismissed shortly after — the Ballon d'Or winner reacting angrily to close attention from his markers during a free kick — but Bale was on hand to nick all three points with his late, late penalty.