Gerard Pique slid Marcelo's cross into his own net before Lionel Messi levelled from a penalty.
Ronaldo, who was a substitute, restored Real's lead when he ran from halfway before smashing an effort home.
He was booked for taking off his shirt to celebrate and shown a second yellow shortly after for a dive - before Marco Asensio scored an excellent third.
Ronaldo felt he should have had a penalty when he went down under pressure from Samuel Umtiti, and appeared to shove the referee in the back after he was shown the red card.
Cristiano Ronaldo scored and was then sent off as Real Madrid beat Barcelona 3-1 in the Spanish Super Cup first leg.
Real host Barca in Wednesday's second leg at 22:00 BST.
The second leg will be played three days later on 16th August 2017 at Santiago Bernabue.
Watch Match Highlights Below: