The sixth-seeded American appeared set to enjoy the afternoon sunshine after plowing through the first set in just 38 minutes and taking an early break in the second at Rod Laver Arena.
However, the Australian broke back to level at 4-4 and held on for a tiebreaker to the delight of home fans but Williams finished in style, firing an ace to win it 7-4.
"Yeah, I think Casey really played well, I have to give her credit for raising her game... She has great things in her future she just has to stay healthy," Williams said of the Australian who has battled back after shoulder surgery.
Williams next faces 17th-seed Francesca Schiavone.
(Reporting by Ian Ransom; Editing by Patrick Johnston)