Wozniacki, who returned to Flushing Meadows for the first time since 2019 after coming out of retirement following the birth of her two children, kept sixth seed Gauff on her toes for two sets but the Dane's lack of match practice caught up with her and she ran out of steam.
The 19-year-old Gauff represents one of the United States' brightest hopes at the year's final major and she beat an opponent 14 years her senior by producing 33 winners.
She next plays the winner of a late-night affair between Polish world No.1 Iga Swiatek and Latvian 20th seed Jelena Ostapenko.
Gauff has been playing the best tennis of her career this season, picking up titles in Washington and Cincinnati, and refused to let herself be rattled as she handed Wozniacki a break with an unforced error in the first game of the match.
She levelled the contest in the fourth game and broke the 2018 Australian Open champion to love in the eighth, as the Dane struggled with her first serve and could not match Gauff's firepower.
But Gauff lost her edge completely in the second set, where the mistakes piled up and she was forced to defend five break points across her first three service games.
She helped Wozniacki to the break in the eighth game with a pair of double faults and appeared irritated with members of her coaching staff.
Gauff handed her opponent another break in the opening game of the third set when she whacked a backhand into the net but broke back in the next game.
The 2022 Roland Garros finalist ran away with the momentum from there, cheering triumphantly as she forced Wozniacki into a backhand error on match point.
Karolina Muchova reached the quarter-finals with a 6-3 5-7 6-1 victory over China's Wang Xinyu.
For the Czech No.10 seed, a 2021 Australian Open semi-finalist, Sunday's win marked her deepest run at Flushing Meadows.
She did it after losing control of the second set to her Chinese opponent, before regaining her dominance in the third with a strong all-court attack that included 32 winners.
"I came back to my game, to slice it more and to change the rhythm - that was the key," Muchova, 27, said in her post-match interview.
Muchova's next opponent is the No.30 seed Sorana Cirstea, who beat the Swiss No.15 seed Belinda Bencic to reach the quarter-finals of a grand slam for the first time since 2009.
The 33-year-old Romanian, who has already put out No.4 seed and 2022 Wimbledon winner Elena Rybakina, beat the Olympic champion 6-3 6-3.
"Unfortunately in tennis, not all the work you've put in is always rewarded," said Cirstea. "So it's nice to work hard and also get the reward.
"Sooner or later if you put in the hard work, it comes."
- with AP