You are not permitted to download, save or email this image. Visit image gallery to purchase the image.
Flyhalf Beale capped a final throw of the dice by the Wallabies, diving over in the corner with 20 seconds of time left under a closed roof at the Millennium stadium.
The deflated Welsh, awaiting the conversion and then final whistle while the prone Leigh Halfpenny received lengthy treatment, sunk to their knees in despair.
It was the perfect send off for Australia captain Nathan Sharpe in the second rower's 116th and final test. Sharpe, handed the honour of trying - and failing - to convert Beale's try, was carried from the field on the shoulders of two team mates.
Needing a draw or win to stay in the world's top eight after a miserable run of form, Wales now find themselves cast into the third band of seeds for Monday's 2015 World Cup pool draw, with Argentina leapfrogging them into the second tier.
Beale also kicked three penalties for the Australians, who return home after tour wins over Wales, Italy and England, with their only blemish a heavy opening defeat by France. Halfpenny landed four penalties for Wales.
Despite losing to the Wallabies for the sixth time in 13 months, Wales coach Warren Gatland said the two sides were equally matched.
"Pretty gutted," said the New Zealander, who will lock horns again with opposite number Robbie Deans in the southern hemisphere summer when he takes the British and Irish Lions to Australia.
"Apart from the last minute I thought we played some outstanding rugby today, it was a close tough tight test match. We put ourselves in a position where we should have won it."
The Welsh, forced to name another patched-up side after a succession of injuries in home defeats to Argentina, Samoa and New Zealand, did not lack for ambition with Gatland's men showing the determination to continue the momentum from a bright second-half showing against the All Blacks last weekend, despite a 33-10 defeat.
They were initially on the backfoot as the Wallabies twice wasted promising early openings. Adam Ashley-Cooper was penalised for a forward pass having broken through the first line before some resilient Welsh defending forced a turnover with the opponents camped on their tryline.
Pushed back, Wales countered with a scintillating break from wing Alex Cuthbert who took an attack that started from behind his own line all the way to Australia's 22 before being forced into touch.
Halfpenny's pace then set up another chance, bursting deep into Australia's half before his kick forward set up a race to the line. Fortunately for the Wallabies, Wycliff Palu just got his hand down first despite the attentions of Sam Warburton and Toby Faletau.
Halfpenny's penalties put Wales ahead 12-9 up after an hour, but, with the Wallabies seemingly running out of gas and ideas, they conjured one final piece of magic from a gruelling season as Beale burst clear from a Dave Dennis pass to break Welsh hearts.
Australia coach Deans said his side had showed the character that summed up their season.
"It was a great game, as all of our encounters have been this year," he said.
"It's a good habit the boys are developing. It was a fast and physical game...just to be in the game at the end was credit to them (his players)."