For the second week in a row the outcome hinged on the final kick, with Lions full-back Leigh Halfpenny falling short with a penalty from halfway.
The Welshman's five penalties had seen the Lions lead 15-9 until five minutes from time.
But Wallabies centre Adam Ashley-Cooper crashed over for the only try, and Christian Leali'ifano held his nerve to land the conversion.
It was another riveting conclusion to a tourniquet-tight contest, but the Lions' hopes of a first series win in 16 years now hang in the balance.
Australia showed tremendous courage to pull the game out of the fire, and it is they rather than the Lions who will now head to Sydney with momentum.
The Lions, who saw captain Sam Warburton hobble off with 13 minutes left, defended heroically at times, but must now regroup for a final throw of the dice in Sydney.
Four first-half penalties from Halfpenny, to three from Leali'ifano, nudged the Lions into a 12-9 interval lead in front of a record Etihad Stadium crowd of 56,771.
Brian O'Driscoll's tackle on Ashley-Cooper in midfield forced the Wallabies to concede the first of eight first-half penalties.
Halfpenny's 48-metre kick missed by the narrowest of margins, coming back off the cross-bar, but thereafter the Welshman was in his usual immaculate form.
Penalties in the ninth, 27th, 33rd and 40th minutes saw the Lions edge a cagey first half in which neither side was able to exercise authority for any extended period.
The Lions appeared to have the edge at the breakdown, Australia conceding four penalties inside the opening eight minutes to earn an early warning from referee Craig Joubert.
Halfpenny landed his first kick after the Lions drove a line-out and the Wallabies took down the maul.
But after a composed start, errors starting to creep into the tourists' game, with the scrum a cause for concern.
(provided by Opta Sports)
Joubert awarded a free-kick against scrum-half Ben Youngs for not getting the ball in quickly enough, before loose-head Mako Vunipola was twice penalised for collapsing.
Leali'ifano, knocked out in the first minute in Brisbane but fit to take over the kicking duties this week, landed both shots at goal to edge the hosts in front.
A knock-on as he over-stretched for a pass completed a miserable 10 minutes for Vunipola, but he responded well. First, opposite number Ben Alexander was penalised for incorrect binding, then the Lions drove the Wallabies backwards at the next scrum to earn another.
Halfpenny landed two confident blows with the boot to nudge the Lions back in front.
Leali'ifano levelled matters again when Dan Lydiate fell offside trying to stem a dangerous Wallabies counter-attack. But the Lions twice benefited from hoisting up high kicks as the interval approached, the second falling to George North, with Jonny Sexton maintaining the momentum through a half-break.
When Ben Mowen was penalised at the ensuing breakdown, Halfpenny's fourth penalty gave the Lions a slender half-time lead.
Australia threw everything at the Lions in a tense and scoreless third quarter, but their defence - led by the obdurate Lydiate - initially held firm.
There were nervous moments aplenty and further frustrations at the scrum. The Lions lost one against the head after Youngs delayed the put-in, while O'Driscoll's pass straight to Folau allowed Australia to counter dangerously, before the Irish centre was penalised for hands in a ruck.
The Lions sent on Conor Murray for Youngs at scrum-half, and the Irishman immediately helped win a relieving penalty over the ball as Australia built up a head of steam.
Media playback is not supported on this device
North had precious few opportunities with ball in hand, but he caught a pass and proceeded to pick up Folau and drive him backwards to galvanise his side.
When they sent the Wallabies back-pedalling again at the next scrum, Halfpenny's fifth penalty in the 63rd minute stretched the lead to six points for the first time.
The strains of "Swing Low, Swing Chariot" - a demonstration of four-nation unity among the legions of red - echoed around the cavernous arena, but Australia were not done yet.
The dangerous Folau, stepping off his wing, was twice denied before the pressure finally told with five minutes left, O'Connor sending Ashley-Cooper crashing over.
Leali'ifano nailed the conversion, but the Lions still had a line-out to save themselves with two minutes left. However, replacement hooker Richard Hibbard could not find his target.
With time up on the stadium clock, the Lions ran a penalty from their own half and got to halfway, where Australia conceded a penalty. But Halfpenny's kick fell agonisingly short.
Australia: Kurtley Beale; Israel Folau, Adam Ashley-Cooper, Christian Leali'ifano, Joe Tomane; James O'Connor, Will Genia; Benn Robinson, Stephen Moore, Ben Alexander, James Horwill, Kane Douglas, Ben Mowen, Michael Hooper, Wycliff Palu.
Replacements: Saia Fainga'a, James Slipper (for Robinson 60), Sekope Kepu (for Alexander 58), Rob Simmons (for Douglas 53), Liam Gill (for Palu 60), Nick Phipps, Rob Horne (for Ashley-Cooper 79), Jesse Mogg.
Lions: Leigh Halfpenny, Tommy Bowe, Brian O'Driscoll, Jonathan Davies, George North, Jonathan Sexton, Ben Youngs; Mako Vunipola, Tom Youngs, Adam Jones, Alun Wyn Jones, Geoff Parling, Dan Lydiate, Sam Warburton, Jamie Heaslip.
Replacements: Richard Hibbard (for T Youngs 56), Ryan Grant, Dan Cole (for Jones 58), Tom Croft (for Warburton 66), Sean O'Brien (for Heaslip 62), Conor Murray (for B Youngs 53), Owen Farrell, Alex Cuthbert.
Referee: Craig Joubert (South Africa)
Attendance: 56,771
The British and Irish Lions face a final-Test decider in Sydney next Saturday after Australia hit back to win a desperately tense second Test in Melbourne.