Gauff advanced to a meeting with another Spaniard, Cristina Bucsa, after powering past Badosa 6-4, 7-6(5) in just under two hours.
The 22-year-old American star, who is chasing a repeat of her 2023 US Open victory, had lost five of her eight previous meetings with Badosa.
But Gauff never looked like letting their latest encounter slip with a largely confident performance to open the Arthur Ashe Stadium evening session.
After a steady start, the American broke Badosa in the seventh game of the opening set when the 28-year-old Manhattan-born Spaniard fluffed a risky drop shot into the net.
Gauff held serve to love to go 5-3 up before comfortably clinching the set with another rock-solid service game.
Gauff looked to be ready to take control early in the second set, when Badosa was broken in the third game - again attempting a delicate drop volley which fell short.
Badosa though broke back to knot the set at 4-4 and then held off two break points to move into a 5-4 lead.
After Gauff levelled to make it 5-5, the two women swapped breaks of serve to set up the tiebreak, with Gauff sealing victory when Badosa smacked a backhand long.
