The four-time champions were on the brink of elimination at 10 for three chasing 123 before vice-captain Haynes made 60 and skipper Lanning managed 41 not out to rescue the home side, who lost their opener against India on Friday
Rachael Haynes and Meg Lanning revived Australia's stuttering women's Twenty20 World Cup title defence with a match-turning 95-run partnership in the home side's tense five-wicket victory over Sri Lanka in Perth on Monday.
The four-time champions were on the brink of elimination at 10 for three chasing 123 before vice-captain Haynes made 60 and skipper Lanning managed 41 not out to rescue the home side, who lost their opener against India on Friday.
"Hopefully it settles our group down," player of the match Haynes told reporters.
"I hope today showed a little bit of our character."
Australia's victory inches them closer to Group A pacesetters India and New Zealand. Only the top two from each of the two five-team groups qualify for the knockout phase.
But they were pushed to the limit by Sri Lanka, who are all but eliminated having lost to New Zealand on Saturday.
"Our young side played really well against the world champions," Sri Lanka captain Chamari Athapaththu said. "We lost the match but won hearts in the crowd."
World number eight Sri Lanka were restricted to 122 for six from their 20 overs after electing to bat on a green-tinged WACA pitch.
In-form Athapaththu, Sri Lanka's best batter, was the standout with 50 but the batting fell away until Nilakshika Silva added invaluable runs in the backend.
The match spectacularly flipped when left-arm quick Udeshika Prabodhani bowled opener Alyssa Healy for a duck and Ashleigh Gardner for two with pearlers. Australia crashed further after Beth Mooney was stumped for six off spinner Shashikala Siriwardene.
Lanning, playing in her 100th T20 International, had a lucky escape in the eighth over when she was caught behind on 15 only to be given not out in a decision unable to be overturned with Sri Lanka out of reviews.
Haynes was dropped on 26 by Siriwardene before changing the momentum with consecutive sixes in the 16th over off spinner Sugandika Kumari.
Haynes fell with 18 runs still needed but Lanning calmly guided Australia over the line with three balls to spare.
India face Bangladesh in the later Group A match on Monday.