John Jeffrey's youngsters were 14-0 ahead at the break and up 14-13 late on, thanks to a Ross Rennie try and three penalties from captain David Blair.
But they were beaten in the last move of the game, at the Stade Darragon in Vichy, to lose 18-14.
Glasgow's James Eddie and John Barclay started for Scotland, while fellow-Warrior Iain Kennedy came on as a replacement.
John Jeffrey said: "The team played outstandingly to a man. Even the Australians admitted how lucky they'd been.
"It was a gutsy performance and we were just seconds away from an historic victory as we've never beaten Australia at this level. But in the end, we fell short.
"Sport can be cruel at times and our boys ran them so close tonight, its heart wrenching."
You can see a couple of photos from the game here