Chasing a rain-revised target of 216 in 43 overs, Australia suffered from regular wicket falls to get bowled out for 189 in 37.1 overs as Sri Lanka bounced back from their opening loss in the five-match series in Pallekele.
Karunaratne returned figures of 3-47 including Steve Smith, for 28, and Glenn Maxwell, for 30, and was ably supported by fellow quick Dushmantha Chameera who got the final batsman to bring the raucous home crowd to its feet.
Spinners Dhananjaya de Silva, Dunith Wellalage and Chameera took two wickets each.
De Silva also scored 34 with the bat and put on 61 runs for the third wicket with Kusal Mendis, who made 36, to guide Sri Lanka to 220 for nine when rain forced play to stop and late end the innings.
Pat Cummins returned figures of 4-35 but his effort went in vain.
Australia lost their openers Aaron Finch, on 14, and David Warner, on 37, to De Silva as the tourists faltered in their tricky chase on a seemingly tough pitch to bat.
Smith and Travis Head attempted to rebuild the innings and put together 31 runs before Karunaratne broke through.
Karunaratne got Smith for 28 and Wellalage’s two wickets of Head (23) and Marnus Labuchagne (18) in his two overs put the Aussies in trouble at 132-5.
Maxwell hit back to unsettle the bowlers in his brief stay at the wicket but finally mistimed a shot to get caught at cover off Karunaratne. He made 30 off 25 balls.
Wicketkeeper-batsman Alex Carey was run out for 15 as wheels came off the Australian chase.
For all the latest Sports News Click Here