World No.1 Barty moved into the quarter-finals of the Adelaide International with a battling 4-6 7-5 6-1 triumph.
The home hope, who is favourite to win the Australian Open when it starts later this month, was a set and a break down against the American before ultimately progressing in two hours and 12 minutes.
Exhausted after a six-month road trip that included Wimbledon glory last year, Barty took a break from the WTA Tour after her third-round exit at Flushing Meadows on 6 September (AEST).
Her return came in a marquee matchup at the WTA 500 event which did not disappoint, as Barty battled to win 11 of the last 13 games and prevail.
The victor stemmed the early errors she was making on the forehand side, with Gauff paying the price for only converting three of her 15 break-point opportunities.
It was only the second meeting between Barty and Gauff, with the Australian having to retire with an arm injury while leading their first encounter in Rome last year.
"I felt like I played a pretty good quality match considering it was my first match in a few months," Barty said.
"In the first set I was able to create opportunities but just was a little bit slack on the execution, rusty in the sense of stringing quality points together.
"Midway through the second set I was able to find my rhythm a little bit better on serve and just continued to be aggressive on my forehand. I just found execution a little bit more.
"Coco played great and forced me to hit a lot of balls. I felt I got better and better as the match went on. It was nice to get some court time."
An intriguing last-eight tie lies in wait for Barty. She will either play former Australian Open champion Sofia Kenin or compatriot Ajla Tomljanovic.
There was more good news for Barty as two of her main rivals for glory were eliminated.
Second seed Aryna Sabalenka was surprisingly beaten as Kaja Juvan, the world No.100, prevailed 7-6 (8-6) 6-1.
Maria Sakkari, the No.3 seed, also crashed out, beaten in three sets by Shelby Rogers, the player who knocked Barty out of the US Open the last time the Australian was on court.
There are two other tournaments taking place this week, both at WTA 250 level.
At Melbourne Summer Set 1, No.2 seed Simona Halep joined Naomi Osaka in round two with a routine 6-4 6-2 win over Destanee Aiava.
The field is not as strong at Melbourne Summer Set 2, where the highest seed remaining, Daria Kasatkina, progressed after opponent Anna Kalinskaya, having already lost the first set, withdrew through injury.