Openers Dimuth Karunaratne and Lahiru Thirimanne were involved in a record opening stand of 133 runs.
A fighting half-century by wicketkeeper-batsman B.J. Watling helped New Zealand to take a highly competitive lead of 177.
Left-arm spinner Ajaz Patel became the first New Zealander to claim a five-wicket haul in Galle.
Dananjaya, bowling with a remodelled action after being reported for a suspect action last year, stood out with his fourth five-wicket haul.
Sri Lanka have also retained Akila Dananjaya from the list of 22 probables announced two days ago.
Chandimal was dropped from the side after poor returns in Australia where Sri Lanka suffered a whitewash under his leadership.
Hasan Ali getting ready for his wedding
Saqlain Mushtaq shows interest in coaching Pakistan Under-19 team
Anderson misses out as England announce unchanged squad for third Test
Shahid Afridi still working hard
Concussed Smith's substitute Labuschagne shines as Australia draw second Ashes Test
Zalmi Chairman receives a prestigious civilian award
Australia withstand Archer pace assault to maintain series lead
Amir performs in his career's final red-ball game
Styris reveals two of the most gifted Indian all-rounders
PSL 2019 - PSL Schedule with all PSL 4 matches and schedule for all franchises