Al-Jazira will face Mexico's Pachuca in the third-place playoff.
The match had two goals disallowed by video review, one for each team.
Al Jazira attacks were rare, but Romarinho fired the Emirati outfit in front with a composed finish four minutes from half-time to leave Madrid facing the prospect of a humiliating defeat.
"We want to defend the title we won a year ago and that is why we came here".
Madrid appeared to have opened the scoring with a header by midfielder Casemiro in the 30th minute. Ronaldo nearly immediately made them pay for that miss moments later as he clinically converted Luka Modric's pass, with the Portugal captain thereby becoming the CWC's record goalscorer. That eventually came when Bale converted with his first touch just seconds after replacing Benzema nine minutes from time.
Karim Benzema twice rattled the frame of the goal after that.
High schooler's heroic act helps marathon runner cross the finish line
Pierce is head of cross country at McKinney Boyd High School. "I tried to will my legs to go, but just couldn't". As soon as we got to the finish line, I pushed her out in front of me so she could cross the tape before I did".
"I like that there are no injuries, it is a good sign, a sign that we are all together and that the squad is very good".
"It's hard to explain the game, all I can say is that we deserved to win and reach the final", Real coach Zinedine Zidane told reporters.
"The team have created chances and I'm disappointed for him because the ball didn't want to go in. I'm happy with how everyone played".
By the time they return to domestic action a week on Saturday, Barcelona - who face Deportivo while Madrid are here in the UAE - could be out of sight.
The Portuguese superstar was not so impressed by the Al Jazira fans taunts at the beginning of Wednesday's semi-final.