An uncharacteristically sloppy showing from the Wallabies, who played fast and loose and made far too many handling errors, helped the courageous Scotland take a 16-15 halftime lead.
But the controversial sin-binning of Scottish winger Sean Maitland for a deliberate knock-on in the 42nd minute proved pivotal in the contest, with Australia crossing immediately through Mitchell to snatch a lead which they wouldn't give back.
However, despite escaping with a win, Wallabies coach Michael Cheika will have much to think about.
Even their famed defence, which had conceded just two tries through the pool games, cracked feebly as Scotland's Peter Horne snuck over untouched having picked up the ball at the back of the ruck.
The Wallabies' scrum, lauded after wins over England and Wales, also felt the pressure of the situation with loosehead prop Scott Sio frequently penalised, which Scotland halfback Greig Laidlaw happily converted into points en route to a 19-point haul of his own.
Sio's night went from bad to worse when he left the field with an injury to his right shoulder.
Australia had started perfectly, with a damaging Tevita Kuridrani bumping off defenders in the fifth minute before drawing the fullback to set up Adam Ashley-Cooper's first try of the tournament.
Ashley-Cooper had a second try taken away from him when the video referee found a knock-on at the breakdown by halfback Will Genia.
But the Wallabies were equally effective on the other side of the field, where Mitchell was the beneficiary of a superb cut-out pass from Kurtley Beale, who started at fullback in place of the injured Israel Folau (ankle).
Mitchell's two tries take his World Cup tally to 14, just one behind all-time leaders Jonah Lomu of New Zealand and Bryan Habana of South Africa.
Australia were put under immense pressure for the final 20 minutes when Scotland pulled within one point through a try to Tom Seymour, who claimed the spoils after teammate Finn Russell had charged down a meek Foley clearing kick.
But Kuridrani again came to Australia's rescue, crashing over from close range after Rob Simmons had won a lineout on Scotland's throw, to put the lead back out to eight points with 15 minutes to play, before the late game drama of Bennett's intercept try and Foley's last-gasp winner.
-AAP
Australia 35 (Drew Mitchell 2, Adam Ashley-Cooper, Michael Hooper, Tevita Kuridrani tries, Bernard Foley 2 conversions, 2 penalties), Scotland 34 (Peter Horne, Tommy Seymour, Mark Bennett tries; Greig Laidlaw 2 conversions, 5 penalties). HT: 15-16
If you are using the app to update the stats swipe down and refresh the page. If you are not on the latest version of the Herald App click here:
Commentary
Match stats
Chalkboard
Action areas