Williams lost the first set of her third-round match with Italy’s Camila Giorgi and trailed 4-2 and 0-40 in the second on Margaret Court Arena in Melbourne.
However, the 34-year-old American dug deep to save the break points and broke Giorgi’s serve when the world No 33 served for the set at 5-4, before winning the tie-break.
Momentum was firmly with the seven-time Grand Slam champion and she claimed an early break of serve in the decider, with Giorgi then forced to save seven more break points in an epic third game which featured 11 deuces.
That was the last game that Giorgi would win as 18th seed Williams hit top form to wrap up a 4-6 7-6 (7-3) 6-1 victory, setting up a clash with sixth seed Agnieszka Radwanska who had earlier defeated American Varvara Lepchenko 6-0 7-5.
“This old cat has a few tricks left,” said Williams, whose last fourth-round appearance in a grand slam was at Wimbledon in the year she was diagnosed with Sjogren’s syndrome, a debilitating autoimmune disease.
Williams added: “She played amazing and did nothing wrong. I just kept thinking I will have some chances at some point. I had never played her before and to play someone of her level at a major is difficult because you don’t know what to expect.”
Asked in an on-court interview about reaching the fourth round after such a lengthy absence, Williams said: “That feels fantastic, especially when things happen in your life and it’s not in your control.
“It’s awesome to be here and I don’t want to leave it at that. I want to keep going.”
Radwanska has dropped just nine games in the tournament so far and it could easily have been two fewer after she served for the match at 5-3 in the second set.
The 25-year-old looked furious with herself at being broken but quickly regained her composure under the watchful eye of new coach Martina Navratilova on Rod Laver Arena.
“It was a really quick conversation and I was very glad that she agreed right away,” Radwanska said of her approach to 18-time grand slam singles winner Navratilova in the off-season. “So far so good.”