The 15-year-old American phenom was forced to dig deep to become the youngest player since Anna Kournikova in 1996 to reach the third round of the women's singles at Flushing Meadows.
"I was tested a lot. I think we both were just testing each other," Gauff said. "It's just that type of match where anyone could have won."
Gauff rode into this year's tournament with enormous expectations after a dream run at Wimbledon where she beat five-times champion Venus Williams on her way to the fourth round.
On Thursday, the two players were evenly matched for most of the contest, with Gauff maintaining a slightly tighter performance and committing 34 unforced errors compared to 42 from Hungarian Babos.
American teenager McNally yearns to play like Federer, not Serena
It was another comeback for Gauff, who worked her way back from a one-set deficit in her first-round match, and the young upstart showed off her fighting instincts after failing to fend off a critical break point late in the second set.
"I thought that the first set, I definitely was in control. In the second set, she raised her level and I wasn't able to finish the set," Gauff said.
A fired up Gauff prevailed after a 12-stroke rally late in the third set to set up a break point opportunity, pumping her fists wildly and shouting in excitement in front of a packed crowd that was firmly on her side.
"I couldn't even see any empty seats!" Gauff said of the crowd, which included retired NBA star Kobe Bryant.
"I don't even know how to really thank you guys. I'm super honoured to be American and play in New York City."
Gauff will face off against 21-year-old Osaka, who also holds the Australian Open title, in the third round of the tournament on Saturday in a clash that may provide a glimpse at the future of the women's game.
'Nervous' Osaka grinds at US Open as Rublev topples Tsitsipas
"Obviously she's an amazing player," said Gauff.
"She's defending champion. She's won two slams. She's number one. She's only 21.
"We're both pretty young.
But I'm a little bit newer to the game. So I'm just curious to see how my game matches up against her."
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ