GLARING ERROR
Her most glaring error came in the sixth game of the second set when a looping backhand from Petkovic landed just over the net to set up an easy winner but Williams was fooled by prodigious backspin and wildly missed the ball with a forehand.
The crowd at Pat Rafter Arena roared with laughter and even Williams smiled, briefly.
Petkovic surrendered a 40-0 lead on serve in the fifth game of the second set, which the world number one ended up taking.
The German saved the first match point on her serve, but a forehand into the net in the following game gave Williams victory.
Williams next plays ninth-seed Slovakian Daniele Cibulkova who defeated Japanese veteran Kimiko Date-Krumm 6-3 1-6 6-3.
Williams's slated semi-final opponent Maria Sharapova has a bye to the last eight after Australian Ashleigh Barty pulled out with an adductor injury.
On the other side of the draw, fourth seed Jelena Jankovic beat Ukrainian Elina Svitolina 6-1 6-3, keeping the Serb on course for a semi-final meeting with defending Australian Open champion Victoria Azarenka.
In the men's tournament, home favorite Lleyton Hewitt held off a spirited challenge from young compatriot and qualifier Thanasi Kokkinakis.
The 17-year-old saved 10 of 12 break points in the first set before succumbing 6-3 and was 5-3 up in the second, only for the veteran to win four straight games to take the match.
The twice grand slam winner faces sixth-seed Feliciano Lopez in the third round, after the Spaniard defeated Mikhail Kukushkin of Kazakhstan in straight sets.