The left-handed batsman hit six fours in his 60-run knock as the visitors ended day three on 129-2 after the hosts had declared their second innings on 247-6 in 55 overs.
With the last session extended by an hour, former Test captains Rahul Dravid and Sourav Ganguly managed to spend some time in the middle before the start of the first Test here on July 23.
Dravid made 26 before being bowled by left-arm spinner Rangana Herath while Ganguly remained unbeaten on 26 off 47 balls on a day that was hit by a 50-minute rain interruption.
Paceman Dammika Prasad, who troubled the Indians in the first innings, picked the other wicket when he had Virender Sehwag (14) caught at deep square leg by Chamara Kapugedera.
For the hosts, Chamara Silva shone with the bat once again, making an unbeaten 59, with four fours and a six. Silva had made 69 in his team's first innings total of 224.
Skipper Jehan Mubarak chipped in with a brisk 41 off 48 balls while Prasad exhibited his all-round skills with an unbeaten 43 off 53 balls.
Off-spinner Harbhajan Singh picked two wickets while fast bowlers Zaheer Khan, Ishant Sharma and Munaf Patel took one each. Indian captain Anil Kumble did not bowl in the second innings.
Sri Lanka Board XI: 224 and 247-6 dec. in 55 overs (C. Silva 59 not out, J. Mubarak 41; Harbhajan Singh 2-53).
Indians: 196-8 dec. and 129-2 in 31 overs (G. Gambhir 60 not out, S. Ganguly 26 not out).