Wales started poorly at the Suncorp Stadium and trailed 10-3 at the break, with Berrick Barnes kicking an early penalty and converting Scott Higginbotham's close-range try.
Scotland had toppled Australia 9-6 in Newcastle on Tuesday but a Wallaby side showing nine changes from that fixture were good value for their advantage and arguably should have been further ahead at the break.
Rob Howley's men needed a bright beginning to the second period but the Wallabies crossed for their second score just a minute after the restart as the impressive Will Genia sliced through from 25 metres.
Barnes' followed his simple conversion from directly underneath the uprights with an equally straightforward drop goal to increase the gap to 14 points and seemingly put the game beyond the Welsh.
But Wales showed great character and hit back in style as Alex Cuthbert picked a stunning line to take Ashley Beck's beautiful offload just after the Ospreys centre had replaced Scott Williams.
Leigh Halfpenny enjoyed a perfect night from the tee, kicking five from five, and his 59th-minute conversion and 62nd-minute penalty brought Wales back to within a point at 20-19.
Wales had a golden chance to go ahead for the first time in the game just before Halfpenny's last penalty but a loose pass led to a knock on from Rhys Priestland as an overlap on the left went begging.
The Wallabies then capitalised on their good fortune when Genia again came to the fore with 66 minutes gone, creating the space for Pat McCabe to cruise over to win it for the Wallabies.
The two sides meet again in Melbourne next Saturday but Wales first take on the Brumbies in Canberra on Tuesday.
Howley will make a whole host of alterations for the clash with Australia's leading Super XV outfit but he will have to wait anxiously for news of a jaw injury to Williams and a worrying leg knock for George North.