They came together with the tourists looking fragile at 2 for 29 and put on 122 for the third wicket in reply to New Zealand's first innings 431.
At stumps, Sri Lanka were 197 for four with Chandimal on 83 and Kithuruwan Vithanage on 10.
Karunaratne was out for 84 after providing stubborn resistance with Chandimal, which was desperately needed after Sri Lanka failed to make the most of the conditions when they won the toss and sent New Zealand into bat.
After the New Zealand innings wrapped up early on Friday, the outlook for Sri Lanka darkened when Test novices Kusal Mendis and Udara Jayasundera fell cheaply, both caught behind by BJ Watling.
But Karunaratne and Chandimal stepped up, curtailing their attacking instincts.
They delicately negotiated their way to bring up the 100 in the 45th over just before tea.
The middle session produced only 65 runs, but while the New Zealand bowlers sent down a series of dot balls they seldom looked threatening.
As the pitch flattened in the final session, Sri Lanka upped the tempo and cracked 48 in 13 overs before left-arm spinner Mitchell Santner made the breakthrough.
Karunaratne, a century-maker against New Zealand a year ago, had played patiently for 198 balls before he slashed at a drifting delivery and gave Watling his third catch.
Skipper Angelo Mathews only made two before he added to Watling's collection and gave Tim Southee a 27th birthday present with the finest of edges to a bullet heading down leg side.
Umpire Nigel Llong said not out but a New Zealand appeal showed the faint edge picked up by the Hotspot technology and Sri Lanka were four down for 156.
Vithanage had a life five overs before stumps when he drove Doug Bracewell hard at Kane Williamson at short cover and was dropped.
Chandimal, who played a chanceless innings, has faced 208 deliveries for his 83.
When on one, he kept out a yorker from Neil Wagner which the speedgun clocked at 160 kilometres per hour -- close to Mitchell Starc's Test record of 160.4.
But the seamer has never bowled anywhere near that speed before, and officials suspected a low-flying bird caused a misreading.
Wagner was one of four wicket-takers with Trent Boult, Tim Southee and Santner also sharing in the dismissals.
Kusal Mendis, in his second Test, was the first to fall when he edged Boult to be gone for eight and provide Watling with his 100th Test dismissal.
Udara Jayasundera, on debut, made one run.
At the start of the day, New Zealand added a further 22 runs to their overnight score 409-8.
Doug Bracewell reached 47, his highest Test score, before he was the last wicket to fall being trapped lbw by Nuwan Pradeep.
Pradeep, the less threatening Sri Lankan pace bowler on the opening day, was ultimately their most successful with four for 112.– AFP
Original source: Chandimal stands firm for Sri Lanka