Dinesh Chandimal prolonged the Sri Lankan resistance with a defiant unbeaten knock of 62 off 106 balls with 11 fours.
Chandimal shared in a fighting 41-run last-wicket stand with Nuwan Pradeep off 74 balls to give the tourists vital extra runs to defend on a turning pitch.
Australia will be bidding for a 3-0 series whitewash after big wins in Hobart and Melbourne, while Sri Lanka are after their first-ever victory in 13 Tests in Australia.