Kusal Janith Perera scored 62 while Lahiru Thirimanne remained unbeaten on 76. Kusal Perera contributed 62 to an opening stand of 101 with the patient Thirimanne, who was dropped on 51 by Dom Sibley at gully as he compiled his highest Test score since 2013.
Bowled out for 135 in the first innings, Sri Lanka showed great spirit to reach 156-2 - trailing by 130 - after England had posted 421.
For the first time in two years, England failed to take a wicket in the first 30 overs.
Thirimanne and Perera were criticised for their first-innings failures, but their century stand was the first time in six Tests that a Sri Lanka opening pair had survived longer than 10 overs.
Kusal Mendis was dismissed for 15 runs.
Joe Root progressed to a magnificent fourth Test double century before he was last man out for 228 as England lost their last six wickets for 49 runs
England all-rounder Moeen Ali, who tested positive for coronavirus upon arrival in Sri Lanka, spent time at the ground in the afternoon after finishing his quarantine period.
Former England captain Michael Vaughan: "Sri Lanka came back really well - they have shown fight and discipline.
"If Sri Lanka bat the whole day tomorrow things will get interesting. Chasing anything on last day becomes tricky.
Sri Lanka is still 130 runs behind England but have a realistic chance of making it a good contest if a decent target can be set for England as they bat last.
Skipper Chandimal and Angelo Mathews are yet to bat followed by Dickwella and two promising all rounders. Therefore, this would not be impossible if the players apply themselves.