The Wallabies lost fly-half Quade Cooper and full-back Kurtley Beale inside 20 minutes at Eden Park.
Cooper could face six months out with suspected knee ligament damage, while Beale appeared to suffer a recurrence of hamstring trouble that sidelined him for last weekend's semi-final defeat against tournament favourites New Zealand.
Wales, though, sorely missed suspended skipper Sam Warburton, plus injured pair Rhys Priestland and Adam Jones.
They will return home tomorrow after losing three of their seven World Cup games - by a combined total of five points - but Wales are guaranteed to be a top-four seed for the 2015 tournament hosted by England.
In truth, it was probably a game too far for coach Warren Gatland's heroes as they looked flat throughout much of an error-strewn contest
Wales could feel relieved to still be on level terms after 10 minutes, yet it did not last long, despite Australia losing Beale.
Williams was in the wars after being on the receiving end of a crunching tackle by hooker Tatafu Polota-Nau, and from the resulting scrum Australia pounced.
Quickfire passing enabled centre Barnes to dash across for a try that O'Connor converted, and a 7-0 lead was no more than the Wallabies deserved.
Wales needed a quick response, and it came in the form of a close-range Hook penalty that opened their account.
Australia's injury woes continued after 22 minutes when Cooper exited the contest. He was replaced by Anthony Faingaa, with Barnes moving to number 10.
But the Wallabies continued punching into the heart of Wales' defence, testing Shaun Edwards' impressive system that had leaked just three tries in Wales' previous five games.
Wales lacked the creative spark they had shown throughout most of the tournament, and Australia continued to pile on pressure, keeping misfiring opponents penned deep inside their own half.
Wales wing George North then departed nursing a gash to his head, which meant a temporary back division reshuffle of Stephen Jones at 10, Hook to full-back and Halfpenny on the wing.
North then returned just as Wales gained a penalty, but Halfpenny sent a long-range attempt wide, and Australia preserved their narrow advantage.
Hook should have cut the deficit to one point four minutes into the second period, but he missed from just 30 metres out, evoking memories of Wales' poor kicking display against semi-final opponents France six days ago.
It was a poor performance by Wales, and they needed some inspiration in a game that had rarely threatened to move out of second gear.
But they responded, albeit with a highly fortuitous try after English referee Wayne Barnes and his French assistant Romain Poite missed a blatant forward pass from Hook.
Hook had chipped into space and gathered the bounce, but then his pass to Williams was at least a yard forward. Play, though, was not halted and the 34-year-old finished off.
Hook could not convert - he was then substituted - before two O'Connor penalties put Australia 13-8 ahead approaching the hour-mark.
O'Connor missed a chance to increase Australia's lead, but Barnes dropped a goal 12 minutes from time and it looked bleak for Wales at 16-8 adrift.
Gatland made several changes off the bench, but Wales could only manage a Jones penalty in reply, leaving them five points adrift with under 10 minutes left.
Australia centre Adam Ashley-Cooper was then denied a try by a superb Jamie Roberts tackle, yet the Wallabies still held territorial control as the clock ticked down.
And they made the game safe when McCalman powered over three minutes from time to secure third spot, although Wales had the final say through a last-gasp Halfpenny touchdown that Jones converted.