Smarting from a 32-15 defeat to England last time out, the Wallabies were up against it when Rob Valetini's red card and a 10-point deficit left them staring at a potentially heavy defeat.
However, Wales, which survived a scare against Fiji despite Eroni Sau's red card, was pegged back and required steely nerves from Priestland beyond the 80-minute mark to secure a 29-28 win.
Australia began in brilliant fashion as Andrew Kellaway collected a grubber and touched down, although Dan Biggar quickly reduced the deficit with a penalty, but the match swung Wales's way when Valetini was shown red for a dangerous high tackle that left Adam Beard bleeding, Biggar then kicking a further three points.
Although James O'Connor's penalty put the 14 men ahead, Kurtley Beale was sent to the sin bin for a deliberate knock-on and Ryan Elias scored Wales's first try after good work at the resulting lineout.
O'Connor and Biggar exchanged further penalties and the latter converted after Nick Tomkins intercepted a pass and scored a simple try, with a television match official (TMO) check allowing it to stand.
Then came the threat of a late surprise. Nic White finished a fine move involving Beale, and although Biggar's boot stretched Wales' lead again, Filipo Daugunu touched down in the corner with O'Connor's kick striking the post to spare the hosts.
Beale's kick then put Australia ahead with two minutes to play, but after winning a penalty inside the visitors' 22 in the 81st minute, Priestland kept his nerve to send Cardiff into raptures.