Star fly-half Johnny Sexton proved the difference with two conversions and four penalties as Ireland won their first Test in Australia for 39 years. The Irish, stung 18-9 in last week's first Test, made eight team changes and frustrated the Australians into errors to take the series to a decider in Sydney next week.
The Wallabies scored three tries to two but the world number two-ranked Irish controlled the ball at the breakdown and profited from Australia's ill-discipline. Ireland led 16-14 at half-time and clinched the Melbourne Test with a charging try from front-rower Tadhg Furlong in the 54th minute.
The Australians fought back with a late converted try to Taniela Tupou, but the Irish defence held firm to close out the win. The Wallabies got off to a flying start when Bernard Foley's inside ball put Kurtley Beale into a gap and the inside-centre beat two Irish tackles to score under the crossbar in the second minute.
But Ireland took quick advantage of winger Marika Koroibete's yellow card for a lifting tackle when Conor Murray put wing Andrew Conway over in the right-hand corner to level the scores in the seventh minute.
Sexton kicked the Irish to a 13-7 lead with two penalties from Australian indiscretions before Koroibete returned to the field. Sexton landed another penalty for a deliberate knockdown by Caleb Timu, with Ireland dominating territory and possession.
But the Wallabies were awarded a penalty try when a rolling maul was illegally brought down and Cian Healy was yellow-carded, reducing Ireland to 14 men.
The Wallabies suffered a blow when scrum-half Will Genia went off late in the first half with a right arm injury and replaced by Nick Phipps. Sexton missed a chance to kick Ireland further ahead in the 30th minute and led 16-14 at half-time.
Ireland lost prop Healy with a knee injury shortly after the resumption, and wing Keith Earls lost the ball over the try-line. But Furlong's first Test try and a Sexton conversion pushed the Irish out to a 23-14 lead, which Sexton extended with a penalty in the 66th minute.
There was a late flurry by the Wallabies, with Tupou scoring after replacement front-rower Jack McGrath received a yellow card for a deliberate knock down. Ireland were on an unbeaten run of 12 internationals until last week, but they have now ended a losing streak of 11 straight Tests against the Wallabies in Australia.