De Villiers (102 not out) and JP Duminy (59 not out) posted an unbeaten sixth-wicket partnership of 123 as South Africa reached 323 for five in their first innings at lunch.
It was De Villiers' sixth century during a record sequence of 12 Test matches in which he has scored a half-century or better and never been dismissed for under double figures.
De Villiers and Duminy saw off the second new ball at the start of an extended morning's play during which 109 runs were scored off 34 overs.
De Villiers, who resumed the day on 51 not out, played himself in cautiously on another overcast morning before starting to unleash his repertoire of strokes.
Australian captain Michael Clarke tried some innovative field placings in an attempt to break the partnership, at one stage having four men in a ring in catching positions on the on-side, only for De Villiers to hit the only six of his innings over the fielders as Peter Siddle attacked his leg stump.
Duminy's half-century was scored off 108 balls with eight fours.
