The Wallabies trailed 13-6 at halftime, after Springboks flyer Bryan Habana crashed over from close range and South Africa were well on top as they gave Australia a masterclass in kicking.
After devastating back-to-back Bledisloe Cup losses to New Zealand, that put Deans' future in a precarious position heading to Perth - Wallabies super-sub Scott Higginbotham broke a 178 minute try-scoring drought when he burst through just two minutes after coming onto the field for No.8 Radike Samo in the second half.
Australia failed to score a point in four consecutive halves of football, but Higginbotham's effort in the 56th minute put the Wallabies in front 16-13 - their first lead of the match.
The Wallabies looked to begin the match with enterprise but fell into the same trap of continuously kicking the ball away.
Springboks fullback Zane Kirchner and five-eighth Morne Steyn punished the Wallabies with a far superior kicking game and put Australia's back-three under pressure with well-placed up and unders.
Long-range specialist Frans Steyn booted two bombs from near the halfway line to put South Africa in a match-winning position, but Australia delivered on their promise of putting in a whole-hearted performance - and showed excellent determination and composure to stay in the match.
Barnes' kicking was questionable in general play, but from the tee he was outstanding and potted six from six.
Lock Sitaleki Timani was named man of the match to continue his outstanding start to the Rugby Championship, as Australia got off the bottom of the ladder with their first win of the tournament.
- AAP