Francesco Totti came off the bench to score an injury-time penalty and put 10-man Italy into the quarter-finals.
With the clock ticking down, Fabio Grosso marauded down the left flank and worked his way into the box before falling over Lucas Neill's prone body.
Totti kept his nerve to convert with the last kick of the game, breaking Australian hearts in Kaiserslautern.
Luca Toni had earlier missed Italy's best chances, before Marco Materazzi's red card for a foul on Marco Bresciano.
The former Everton defender's dismissal, which was harsh to say the least, altered what had been an open game up until then, as both sides seemed to settle for keeping it tight.
The Socceroos, who had escaped on numerous occasions when Italy's strikers should have done better earlier in the game, failed to make the most of their one-man advantage despite a wealth of possession.
Tim Cahill, with a header, and Bresciano, with a long-range stinger, came close to snatching what had appeared to be an unlikely win before the game late on.
But, in truth, Italy keeper Gianluigi Buffon was largely untested and Guus Hiddink's side paid the price in the third minute of stoppage time when Totti, surprisingly left out in favour Alessandro del Piero, bagged his first goal of the competition.
It was reward for another superb defensive display from Marcelo Lippi's side, even if their attacking efforts left a lot to be desired.
Toni in particular was the most guilty in a profligate Azzurri attack, though he was unfortunate not to have done better with a header that went just wide early on and a later turn and shot that Mark Schwarzer stopped with his feet.
Other chances went begging for Italy, as Alberto Gilardino also failed to make the most of some decent openings without Schwarzer having to make another decent save.
But, after Materazzi's harsh dismissal, it was Australia who dominated possession and the shame for them was that they could only produce neat and tidy football, which was ultimately toothless without the injured Harry Kewell.
Scott Chipperfield, on his 50th international appearance, wasted their two best chances - twice firing straight at Buffon when well placed in the area.
And he and Australia were left to rue their lack of ambition at the death, as Totti stepped up to go some way to redeeming himself after a lacklustre tournament so far and stretch Italy's current run to 22 matches unbeaten.
The Azzurri will now play Ukraine after Oleg Blokhin's side defeated Switzerland on penalties in Cologne.