At the break, Lahiru Thirimanne was unbeaten on 48 and Angelo Mathews 31 not out as bad weather that had washed out most of the first two days finally gave way to sunshine.
India lost its last five wickets in a single session to be all out for 172.
Resuming on 74-5, India added another 98 runs before its first innings ended at lunch.
Sri Lanka began its reply in hectic fashion as openers Sadeera Samarawickrama (23) and Dimuth Karunaratne (8) quickly put on 29 runs for the first wicket.
Bhuvneshwar Kumar (2-38) struck the first blow. Karunaratne was trapped lbw and the decision stood despite a DRS review from the batsman.
Two overs later, Samarawickrama was caught behind as Kumar struck again.
But Thirimanne and Mathews dug in against an intense effort by the Indian pacers. Mathews had survived an early lbw call via DRS.
Shikhar Dhawan dropped Thirimanne at first slip off Umesh Yadav (0-26) in the 18th over.
Sri Lanka crossed 50 in the 14th over. The pair brought up the 50 partnership for the third wicket off 85 balls.
Ravichandran Ashwin was introduced in the 23rd over but failed to make an impact. The visitors then crossed the 100 mark in the 25th over, cutting down India’s low total.
Earlier, Cheteshwar Pujara top scored for India with 52 runs while Suranga Lakmal was the most successful of the Sri Lankan bowlers, capturing 4-26.
Pujara, 47 overnight, reached his 16th test half-century off 108 balls before he was bowled by an inswinger from Lahiru Gamage.
Wriddiman Saha (29) and Ravindra Jadeja (22) added a valuable 48 runs for the seventh wicket before they both departed in the same over from Dilruwan Perera.
Mohammed Shami, batting at 10, chipped in with a rapid 24 to prop up the tail before he was the last man out.