O’Connor missed the conversion and the Wallabies then lost fullback Barnes to a head injury, allowing Beale to enter the fray.
His first duties were defensive as the Lions charged back into the Wallabies half, with a break up the middle from prop Alex Corbisiero taking them within a couple of meters of the home side’s line.
The Wallabies infringed at the subsequent ruck, but Halfpenny missed only his second place-kick on the tour and the Lions had to be satisfied with a 13-12 halftime lead.
Seven minutes into the second half, the Australians lost a third back, Pat McCabe, to a neck injury, forcing flanker Michael Hooper to move into the centers, where he started his career.
His first contribution in the backline was a flailing tackle that missed Alex Cuthbert as the Lions winger burst through the midfield and beat two more tacklers to touch down.
O’Connor and then Beale kicked penalties for the home side, before Halfpenny slotted his third to give the Lions a 23-18 lead with 15 minutes to go.
Beale then added his second penalty, set up by his own break up the middle, but shanked a third with five minutes remaining to keep the Lions just ahead for the dramatic end.
“It’s very disappointing,” Wallabies skipper James Horwill said. “We’ve got to be more clinical and make the most of our opportunities.”