Mahela Jayawardene hit a classy 105 and Angelo Mathews made 93 to hold off Australia, but the rest of the batting caved in.
It was Michael Clarke's first Test win as Australian captain, having lost to England by an innings in Sydney in January when he stood in for the injured Ricky Ponting.
The emphatic win in Galle helped Ponting set a new benchmark of becoming the first cricketer to have been part of 100 Test victories.
The 36-year-old, the team's frontline batsman, was already Test cricket's most successful captain with 48 wins when he stepped down in April to make way for Clarke.Jayawardene and Mathews, who came together on Friday afternoon with Sri Lanka tottering on 68-5, put on 142 for the sixth wicket in a courageous fightback.
The pair batted through the entire morning session, defying the Australian bowlers on the dusty, crumbling wicket that made strokeplay difficult.
The classy Jayawardene, 34, Sri Lanka's highest run-getter in Test cricket, notched up his 29th century with the help of 15 boundaries and a six.
Mathews, 10 years Jayawardene's junior, showed why he is regarded as one of the most exciting young talents in the modern game even though he narrowly missed his maiden Test century.
The partnership made some amends for the home team's poor batting earlier in the match, when Sri Lanka were shot out for 105 in the first innings and reduced to 68-5 in the second.
The stand was broken in the seventh over with the second new ball when Jayawardene inside-edged a delivery from Harris on to his stumps after lunch.
Mitchell Johnson had Suraj Randiv fending a catch to second slip, while Mathews was ninth out, bowled by Shane Watson attempting a big hit.
Sri Lanka had added six runs to their overnight score of 120-5 when heavy rain interrupted play for an hour.
But the weather cleared soon and the umpires delayed the lunch break by 30 minutes to make up for lost time.
Clarke rotated his four frontline bowlers in a bid to break the stand as Jayawardene and Mathews dug in to keep the scoreboard moving.
Mathews reached his third half-century with two consecutive boundaries off Johnson, guiding the left-arm seamer through third man before pulling him to the mid-wicket fence.
A confident Jayawardene lofted off-spinner Nathan Lyon for six and then played an audacious scoop shot off the same bowler over the wicket-keeper's head, a stroke made famous by his captain Tillakaratne Dilshan.
The second match in Australia's first Test series in Sri Lanka since 2004 will be played in Pallekele from September 8 and the third at the Sinhalese Sports Club in Colombo from Sept 16.