The American, who beat Maria in Auckland last year, roared back from an error-riddled first set to sweep through the second and close out the affair with a sublime backhand winner.
She will play 2019 semi-finalist Elina Svitolina of Ukraine in the next round.
"I have really nothing to lose," said Gauff, who credited her team with helping her stay relaxed under the pressure of the year's final major.
"I think we just treat it like practice, at the end of the day. We have fun before and after matches."
Gauff was red hot as she broke Maria in the opening game but helped her opponent to a break point with a handful of clumsy errors in the next game.
The third seed hardly had the run-up to New York that she had hoped for as she exited Toronto and Cincinnati early, and she appeared visibly frustrated at times as she put up 20 unforced errors and seven double faults in the first set.
She turned it around when she broke her opponent from the baseline in the seventh game and clawed her way back from 15-40 in the 10th.
A technical error caused the loudspeaker at Arthur Ashe Stadium to blare the word "stop," forcing the players to replay set point, but Gauff was not rattled and had a poker face as she walked back to her bench.
Maria dropped her serve with a double fault in the first game of the second set and Gauff forced the German into an error to make it 3-0, as a handful of mid-match adjustments paid off.
She started coming to the net more, catching Maria off-guard as she improved virtually every aspect of her game, running away with the match to wild applause from the home crowd.
--Reuters--