The opener came five minutes after Real's world record signing Gareth Bale had spurned a great opportunity to put his side ahead when he picked up the ball in midfield after Tiago gave possession away cheaply.
Welshman Bale surged forward, powering his way deep into the Atletico penalty area, but waited too long to shoot and when he did he fired wide of Thibaut Courtois' goal.
That started a surge of Real pressure that finally paid off when Ramos headed the equaliser to force extra time.
The first period of that ended without another goal, but Real finally took control of the game in the last 15 minutes when Bale headed them in front in the 110th minute before Marcelo fired home the third and Ronaldo scored from the spot.
Ronaldo's goal was his 17th of the campaign, an all-time record for the competition, and meant Carlo Ancelotti became only the second man after Bob Paisley of Liverpool to win three European Cups as a coach after the Italian's earlier successes with AC Milan in 2003 and 2007.