The Matildas escaped from a monumental semifinal scrap with Thailand, needing an injury-time equaliser and penalties to edge the minnows and reach the Asian Cup final.
Australia stood on the brink of elimination at the end of 90 minutes, trailing 2-1 after a shambolic display. But Alanna Kennedy and goalkeeper Mackenzie Arnold rectified shocking defensive efforts with clutch moments to send Australia into a third-straight continental final.
Kennedy netted a 91st minute equaliser and Arnold made three straight saves in the shootout before Sam Kerr netted the decisive penalty in a 2-2 (3-1) win.
The Matildas were disjointed and error-prone; a shadow of the side that belted Thailand 5-0 in Perth just three weeks ago. Australia's performance was in contrast to the determined Thais, who saw Wilaiporn Boothduang sent off in the 87th minute but battled on.
Injured striker Caitlin Foord, speaking on Fox Sports, said it best when she called the Matildas display "embarrassing", and eventual triumph "very, very lucky".
Coach Alen Stajcic only had praise for one team at the final whistle.
"I didn't think I'd be sitting up here as a winner and being so disappointed," he said. "If we're going to be positive I think we have to be positive about how well Thailand played. Their heart and their spirit were fantastic and they played with everything ... they deserved to win tonight."
Australia had taken the lead on 17 minutes when Emily Gielnik's cross was nodded in by Thai defender Kanjanaporn Saenkhun. Then it went pear-shaped, with walkabout goalkeeper Arnold and Kennedy at the heart of the horror show.
The defensive pair failed to deal with a long ball shortly after the opener, allowing Kanjana Sungngoen to score with a chip fumbled in by Arnold.
After the break, they both bungled clearances, letting in Rattikan Thongsombut to give the Thais a deserved lead.
Stajcic had gambled with his selection, making six changes to the side that drew with Japan. It backfired, with Kerr and Emily van Egmond watching on as Australia went behind to the world No.30s.
The pair were thrown on to rally Australia, and an opening came when Boothduang was sent off for chopping down Kerr.
An impotent attacking effort ended in the 91st minute when Kennedy powered a header home from Elise Kellond-Knight's stunning corner. Against 10 women, Australia seemed sure to find a third but Lisa De Vanna and Kerr spooned simple efforts in extra-time to bring on the shoot-out.
Arnold's fine work saved the Matildas' bacon, and spared her own blushes. The final takes place on Saturday morning (AEST), with the Matildas to take on Japan, who beat China 3-1 in Tuesday's other semi-final.
"We've got to improve in three days time ... we've got a lot of soul searching to do and a lot of reflection to see what we can do," Stajcic said. "We've got a couple of days to recover and now and hopefully we'll put in a better performance in the final."