Victory was sealed two minutes from time by replacement Lachie Turner’s breakaway try after South Africa’s Francois Steyn, who missed two goal-kicks, was turned over.
Lote Tuqiri, making his first start since knee surgery after this year’s Tri-Nations, opened the scoring for the Wallabies.
Australia wing Ryan Cross burst down the right from deep in his own half and his clever cross-kick was gathered by Tuqiri who strolled in under the posts.
Teenage full-back James O’Connor added the conversion on what was his first start for the Wallabies.
And the 18-year-old soon stretched Australia’s lead to 13-0 with a couple of penalties.
The Barbarians were rewarded with two penalties from Montgomery, the Springbok record points scorer, and at half-time Australia’s lead had been cut to 13-6.
The Barbarians were 13-6 behind with just under 30 minutes left when they got back into the game with a superb try.
Australian fly-half Quade Cooper’s poor kick out of defence gave possession back to the Barbarians and Steyn, also playing at fly-half, threw a long cutout pass to Wales wing Shane Williams who passed inside to All Black flanker Jerry Collins, who went over for the try.
Steyn missed the conversion but Australia’s lead was now 13-11.
On the hour, former Australia captain George Gregan came off the Barbarians bench to face his compatriots but there was no fairytale finish for the scrum-half as Steyn pushed a penalty wide with the Wallabies just two points ahead.
Barbarians scorers: Tries: Collins. Pens: Montgomery 2.
Australia: Tries: Tuqiri, Turner. Cons: O’Connor. Pens: O’Connor 2.
BARBARIANS: Montgomery, Rokocoko, Gear, de Villiers, Habana, Steyn, du Preez, Collins, McCaw, Burger, Muller, Botha, Johnston, Smit, Pucciariello.
AUSTRALIA: O’Connor, Tuqiri, Cross, Ashley-Cooper, Ioane, Cooper, Sheehan, Brown, Smith, Mumm, McMeniman, Chisholm, Dunning, Polota-Nau, Kepu.
Referee: Chris White (RFU).