Australia made 254 for six and then bowled out South Africa for 230, Brett Lee finishing with four for 48. South Africa lead the five-match series 2-1.
South Africa slumped to 69 for five before AB de Villiers, with a career-best 68, and Shaun Pollock (69) added 119 in 22 overs and brought the home side back into contention.
But a sensational boundary catch by Brad Hogg, leaping one-handed above his head, dismissed de Villiers off the useful left-arm spin of Michael Clarke.
Shane Watson bowled Pollock to end his dazzling 74-ball innings and South Africa were out of the hunt despite a late flourish from Roger Telemachus who struck three mighty sixes in his 29 off 13 balls.
Earlier, Ricky Ponting returned to action for Australia after recovering from an abdominal strain, top-scoring with 62.
Damien Martyn hit 51 off 69 balls to see Australia through to the last five overs after Ponting was fooled by the length of a Pollock delivery and skied a pull to long-on.