Ahmedabad: Having taken a 334 -run first innings lead over India, visitors kept their hopes of winning the first Test by taking two Indian wickets for 190 runs on the penultimate day of first Test at Ahmedabad.
The home team are still trailing by 144 runs and they will have to play the entire final day on Friday to save the Test.
India were off to a good start in the second innings as Virender Sehwag smashed a typically robust 51 with seven boundaries in a first-wicket stand of 81 with Gambhir.
India Vs Sri Lanka, 1st test, Scorecard
Rahul Dravid, who made 177 in the first innings, put on 88 for the second wicket with Gambhir before he was declared leg-before to seamer Chanaka Welegedara for 38.
Gautam Gambhir (74) and night watchman Amit Mishra (12) were at the crease at stumps.
Sri Lanka tour of India - Fixture - Top 10(R/W)
Earlier, Mahela Jayawardene (275) and Prasanna Jayawardene (154 not out) took Sri Lanka to a commanding 760 for seven in reply to India"s 426 in the first innings.
The 385-run partnership between Mahela and Prasanna was also a record sixth-wicket partnership. They surpassed the 346-run stand between Jack Fingleton and Don Bradman at Melbourne in January 1937.
Mahela Jayawardene batted for eight hours in his sixth double-century that was studded with 27 boundaries and a six.
Mahela, the ninth-highest scorer in Test cricket, completed 9,000 runs when he reached 253 with a single to long-on off Harbhajan.
He was dismissed in the third over after lunch when he shaped to drive leg-spinner Mishra, missed the line and was bowled out. Prasanna Jayawardene finished unbeaten on 154 from 314 deliveries.
All the four front-line Indian bowlers conceded over 100 runs with Mishra being the most expensive with 1-203 from 58 overs and Harbhajan going for 2-189 from 48.4 over.