The 20-year-old American displayed remarkable resilience, winning the match with scores of 4-6, 6-4, 6-2.
Badosa, currently ranked 19th in the world and a former world number two, appeared to be in control when she led 4-3 in the second set while serving. However, Gauff managed to break her serve and won the next four games, forcing a decisive third set, which she completed in two hours and 21 minutes.
In the final, Gauff will compete against either unseeded Czech player Karolina Muchova or the fifth-seeded home favorite Qinwen Zheng.
Badosa, who had dropped to 140th in the world rankings in May, entered the semi-final in strong form, having previously defeated second seed and US Open finalist Jessica Pegula in the round of 16.
She capitalized on Gauff's inconsistencies, particularly her serving, which included 11 double faults, to take the first set and break Gauff in the opening game of the second set.
Gauff, who recently began working with new coach Matt Daly after parting ways with Brad Gilbert following her fourth-round exit at the US Open, saved four break points to avoid falling behind 4-1 in the second set. This pivotal moment shifted the momentum in her favor, allowing her to regain her composure as Badosa lost her first set of the tournament.
In the final set, Gauff broke Badosa's serve three times to secure the victory, aiming to add to her sole title of the year, which she won in Auckland in January.
She stated, "I tried to stay focused, it was tough but mentally I just tried to reset,"