It was an amazing play as the 19-year-old American had to come from a breakdown in the third set to win 6-3 3-6 6-1.
The sixth seed Gauff is bidding for a first Grand Slam title.
The victory also ended Wozniacki’s extraordinary comeback run after a three-and-a-half-year absence from the sport.
Gauff will face former French Open winner Jelena Ostapenko in the last eight after the Latvian 20th seed knocked out top seed Iga Swiatek.
Gauff arrived at her home Grand Slam full of confidence after title wins in Washington and Cincinnati.
Her fine form looks set to continue as she showed great resilience to fight back in the third set and register an impressive win against a resilient Wozniacki.
Gauff joked afterward that her father can no longer sit in her support box because he gets too nervous during matches.
“He’s been doing laps around the stadium,” she said.
“I don’t know if he can hear me but I felt his good energy even if I couldn’t see him.”
Broken in her opening service game, Gauff was able to overcome a nervy start to level the scores at 2-2 before getting the decisive break to lead 5-3 and serve out the opener on the third set point.
Despite saving five break points in the second set, a frustrated Gauff eventually conceded serve to trail 5-3 and allow Wozniacki to take the fourth-round tie to a decider.
The teenager found herself a break down once again at the start of third and directed her frustration towards her coaching team, shouting at them to stop talking to her.
The home favorite channeled her energy well, overturning the deficit and breaking Wozniacki to take control of the match, all the time roared on by the crowd inside Arthur Ashe Stadium.
Since her disappointing first-round exit at Wimbledon in July, Gauff has lost just one of her past 16 matches and is currently on a nine-match winning streak.
The world number six has only reached one Grand Slam singles final before – the 2022 French Open, where she lost 6-1 6-3 to Swiatek.
But she is looking forward to being on top of the chart in this tournament.
Follow us for the latest sport updates.