Real Madrid avoided humiliation against Al Jazira as Bale's late winner earned them a 2-1 victory and a place in the final of the FIFA Club World Cup.
Despite Real dominating the match at the Zayed Sports City Stadium in Abu Dhabi, it was the team from the United Arab Emirates who took a shock 41st-minute lead through Romarinho.
And Al Jazira looked to have gone two ahead early in the second half but it was chalked off for offside after a video referral.
Cristiano Ronaldo equalised shortly afterwards and substitute Bale scored moments after his introduction with nine minutes left to set up a final clash with Brazilians Gremio on Saturday.
In the early stages, it was hard to see any result other than a convincing win for Real, winners in two of the last three seasons.
They had seven efforts on goal in the opening 14 minutes but goalkeeper Ali Khaseif performed heroics to keep the scoresheet blank.
He pushed a deflected Ronaldo header on to the crossbar, with Karim Benzema seeing the follow-up blocked, and then kept out Luka Modric, also with the help of the frame of his goal.
Two more Ronaldo efforts were kept out by the 30-year-old, but they took their toll and he needed lengthy treatment to his right thigh.
Khaseif decided he could continue and, although hobbling, produced brilliant flying saves to keep out first Benzema and then Modric.
Al Jazira qualified for the competition by winning the UAE Pro-League and defeated Japan's Urawa Red Diamonds in the quarter-finals.
It was not purely attack against defence, with Al Jazira demonstrating a real threat on the break, and star striker Ali Mabkhout was close to a goal in the 21st minute but shot just wide.
Real then had a first goal chalked off when Benzema's header was ruled out for a foul by Ronaldo.
It was deja vu in the 31st minute as Casemiro headed in. Having initially seemed to disallow the goal, Brazilian referee Sandro Ricci then gave it but it was referred to the Video Assistant Referee.
Ricci went to the touchline to have another look and decided to change his mind, ruling Benzema to be offside despite the striker not touching the ball.
REUTERS
Real Madrid beat Al Jazira thanks to Gareth Bale's late goal
Invalid email
We use your sign-up to provide content in ways you've consented to and to improve our understanding of you. This may include adverts from us and 3rd parties based on our understanding. You can unsubscribe at any time. Read our Privacy Policy
And Real were stunned 10 minutes later when another Al Jazira break was finished off by Brazilian Romarinho, who showed great composure to cut inside and find the bottom corner.
Three minutes after the break Al Jazira were in dreamland when, from a Real corner, Mabkhout and Mbark Boussoufa broke and the latter stroked the ball into the net. But the video referee took another look and spotted Boussoufa had strayed marginally offside.
It was the turning point of the game as in the 53rd minute Real finally got their goal, Modric setting up Ronaldo.
The first task for Khaled Al Senaani, who had replaced the ailing Khaseif, was to pick the ball out of the net but he proved an able deputy with two fine saves to keep out Benzema.
The pressure was growing and the unfortunate Frenchman hit the post twice in four minutes.
Just as extra-time was beginning to look a real possibility, Bale was introduced after recovering from a calf injury and promptly finished off Lucas Vazquez's cutback.