Los Blancos broke the deadlock after eight minutes as Karim Benzema tapped home from close range, after Hotoshi Sogahata goalkeeper could only parry Luka Modric's effort.
The tournament's hosts did not sit back and they eventually leveled matters just before the break as Gaku Shibasaki controlled well, before firing into the bottom corner from close range.
Antlers then took the lead shortly after the break as Shibasaki grabbed his second of the with a fine finish from 25-yards out.
Los Blancos were awarded a penalty in the 58th minute when Lucas Vazquez was brought down in the box. Ronaldo stepped up and converted his spot-kick.
Both sides pushed for a winner in the closing stages, but were unable to find the back of the net, forcing the game into extra-time.
Los Blancos then went ahead in the 97th minute, as Benzema turned provider to play in Ronaldo, who drilled the ball into the bottom corner, 3-2.
Ronaldo grabbed his hat-trick and Real's fourth goal in the 104th minute, as he slammed home from close range, after being played in by Toni Kroos.