At stumps of the fourth day, the hosts were 170-3, with Mendis (unbeaten at 60) and former skipper Angelo Mathews (unbeaten at 17) batting at the crease.
Opener Dimuth Karunaratne fell just one run short of half-century as he struck a 49-run knock besides sharing a 58-run stand with Upul Tharanga (27) to provide his side with an initial thrust in the second innings.
Mendis, who fought off hamstring trouble in the final session of the day, then steadied the hosts' innings as he scored a 60-run knock, including six boundaries, and put together an unbeaten 37-run stand with Mathews to take the one-off Test match into the final day.
Earlier, resuming at yesterday's score of 252-6, Zimbabwe were bowled out for 377 in their first innings.
Sikandar Raza (127) was the top-scorer for the visitors as he not only notched up his maiden Test century, but also stitched a huge 144-run stand with Malcolm Waller (68) for seventh wicket to help his side accumulate 318 runs after being reduced to 59-5 on Day Three.
Peter Moor (40) and Graeme Cremer (48) also made significant contributions in their second innings.
For Sri Lanka, Rangana Herath was the pick of the bowlers with six wickets while Dilruwan Perera and Lahiru Kumara also took three and a wicket, respectively.
Till date, Sri Lanka's highest-ever successful run chase was against South Africa in 2006, when they chased down a huge target of 353 runs in Colombo.
It will now be interesting to see whether they would manage to break that record.
Zimbabwe, on the other hand, are seeking their first-ever Test win against Sri Lanka. (ANI)