A combination of errors and resilient Lions defence frustrated the Wallabies for most of the second half until James O’Connor sent Adam Ashley-Cooper through for the only try of the match.
Lealiifano, who lasted just 40 seconds in his debut Test the previous week when he was knocked out in a tackle, landed the conversion from wide out to put the Wallabies ahead into the final dramatic minutes.
The Wallabies conceded a penalty to give the Lions another crack but Leigh Halfpenny, who had only missed one kick in his previous six attempts, left it just short from halfway to Australia’s jubilation, sending the epic series into a decider in Sydney next weekend.
“It’s all bets are off. It’s all square now. It’s now one game to win it. It’s like a grand final, really,” Wallabies’ skipper James Horwill said of the situation facing both teams into the final week.
Halfpenny slotted over five penalty goals from seven attempts with another coming off the crossbar, while the Wallabies got home on the back of Ashley-Cooper’s game-breaking try and Lealiifano’s conversion and three penalties.
“I’ve seen him kick them from there before. He just didn’t strike that one well enough. Just a chance to be a hero in that moment … unfortunately he hasn’t hit it quite as well as he’s capable of doing,” Lions coach Warren Gatland said of Halfpenny’s late miss.
The Lions must now regroup from their bitter disappointment of not finishing off the Wallabies in Melbourne to win their first series since 1997.
“We have a very determined bunch of players,” said Lions captain Sam Warburton, who came off 13 minutes from the end with an injured hamstring.
“It goes down to the last match now. There’s still a Test series up for grabs. By no means this is over.”
The Lions put the Wallabies under pressure from the kickoff with dominant forward play and got an early long-range penalty but Halfpenny’s attempt hit the crossbar and bounced back into the field of play.
But he made no mistake in the 10th minute to give the Lions the early lead.
The Australians put the Lions scrum under pressure and after several re-sets, Mako Vunipola was penalised for collapsing the scrum, giving Lealiifano an easy penalty conversion after 16 minutes.
Vunipola was then penalised again for collapsing the scrum, giving Lealiifano his second penalty goal to put the Wallabies in front.
Vunipola lost the ball, but Halfpenny levelled the scores at 6-6 before Vunipola redeemed himself by forcing opposing prop Ben Alexander to concede a penalty.
Halfpenny put it over to retrieve the lead for the Lions.
The England prop was in the thick of the action and he appeared to hit Ashley-Cooper off the ball which could have further ramifications after the match.
Ashley-Cooper crashed to the ground but resumed after treatment as the Wallabies hit back five minutes before half-time when Dan Lydiate was penalised for offside, giving Lealiifano his third penalty.
But right on half-time Ben Mowen was penalised in the ruck giving Halfpenny his fourth penalty and a 12-9 lead.
The Wallabies frustratingly conceded their fifth penalty while on attack as the home side dominated territory in the second half.
The immensely strong George North carried Israel Folau on his back in a bullocking run only to be brought to ground on his head in a tense moment.
Replacement prop James Slipper was penalised as the Lions scrum drove through for Halfpenny to slot a 48-metre penalty and push the Lions out to a six-point lead with 18 minutes left.
The Lions lost their inspirational skipper Warburton with injury in the final stages as the Wallabies fumbled yet another ball inside the tourists’ half.
But the breakthrough came after more Australian pressure and O’Connor, enjoying a better match at flyhalf this week, cleverly put Ashley-Cooper spearing through for the only try of the Test.
Lealiifano nervelessly guided the winning kick over to finish his team’s hero.