The hosting Aussies broke the deadlock in the ninth minute when Berrick Barnes sent a penalty between the posts.
That lead was extended to 10-0 in the 16th minute when Scott Higginbotham's try was successfully converted by Barnes.
Wales reduced the arrears to 10-3 before the break thanks to Leigh Halfpenny, who converted a penalty.
Will Genia added another try for Australia two minutes after the restart when he broke free of the Wales defence with a weaving run. Barnes was again on hand to add a further two points with a conversion.
Halfpenny added another penalty moments later to bring Wales to six points, before Barnes continued his good form with the boot with a drop-goal.
Another penalty from Halfpenny followed in the 57th minute and then Alex Cuthbert brought the visitors to within touching distance of their hosts with a try, which was converted by Halfpenny.
The same player brought the score down to 20-19 in favour of Australia in the 62nd minute when he scored another penalty.
The match was taken away from Wales in the closing stages though as Genia and Barnes again combined with a try and conversion respectively.