A Gaku Shibasaki double threatened one of football's greatest shocks after Karim Benzema had given Real an early lead in Yokohama.
But Ronaldo equalised from the penalty spot before pouncing twice in extra time to give the Spanish giants their second world title in three years and fifth in total.
"Bloody hell, what a game!" said a breathless Ronaldo. "We had to suffer, but that's what finals are about. It's a trophy we really wanted to win and we end the year in the best way possible so I'm very happy."
The victory extended Real's club-record unbeaten run to 37 matches in all competitions, while French coach Zinedine Zidane surpassed Fabio Capello's record for their best start to a season.
The European champions, yet to be defeated in 26 games this campaign, were forced to dig deep by an Antlers side who finished a distant third over the J-League season before winning the championship final.
Benzema's close-range opener was cancelled out on the stroke of halftime by Shibasaki, who took advantage of some calamitous defending from Raphael Varane to score with a sharp volley.
The Japan midfielder then sparked wild celebrations among a crowd of 68,000 seven minutes after the break when he smashed home a left-foot shot from a distance.
Kashima's lead was short-lived, however, as Ronaldo restored parity from the spot after Lucas Vazquez was clattered by Shuto Yamamoto.
Ronaldo, who scooped his fourth Ballon d'Or last week, put Real back in front with a clinical low finish eight minutes into extra time after a deft pass from Benzema.
And the Portuguese superstar completed his hat-trick -- the first in a Club World Cup final -- six minutes later with another poacher's strike to break Japanese hearts.
(This story has not been edited by NDTV staff and is auto-generated from a syndicated feed.)