New Zealand is expected to declare soon with less than four sessions to bowl out Sri Lanka and square the series.
In the third over after lunch, after New Zealand resumed on 59-2, Nuwan Kulasekara dismissed Kane Williamson (18) and Daniel Flynn (0) in successive balls and two balls later Rangana Herath had wicketkeeper Kruger van Wyk (0) caught at leg slip as New Zealand slipped to 75-5.
Taylor stopped the slide, complementing his first-innings century with an unbeaten half century.
Earlier, Sri Lanka was bowled out for 244 after resuming on 225-6. Thilan Samaraweera was dismissed without any addition to his overnight score of 76 when a Trent Boult delivery squared him up and the outside edge flew to second slip where Martin Guptill took the catch.
Boult also dismissed Suraj Randiv, the other overnight batsman, after he completed a career-best 39. Boult finished with figures of 4-42 as three of the four wickets that fell in the morning went to him.
Tim Southee picked up the remaining wicket to finish with figures of 5-62, his third five-wicket haul in test cricket.