Wicketkeeper batsman Niroshan Dickwella fought a lone battle for Sri Lankans but he was ninth man out after a three-hour vigil.
Both teams made one change from the first match.
In that period of time New Zealand tried to make the most of it to press for quick runs.
The partnership between Latham and Watling came off 258 deliveries. New Zealand declared on 431 for 6 after BJ Watling's ton and bought themselves enough time to force an innings win, only the fourth by a non-Asian side in Sri Lanka. At the end of play on day one, Karunaratne is batting at a score of 49 while Mathews is yet to score a run. The pacemen claimed two wickets each as Sri Lanka reached 144 for six at lunch when rain came down and no further play was possible.
Skipper Dimuth Karunaratne provided some resistance with his 70-ball 21 as he and Dickwella put on 41 runs for the sixth wicket before Southee broke the stand.
The Black Caps were unable to set about trying to build a healthy lead when the morning session on day four was washed out at P Sara Stadium.
Paceman Suranga Lakmal sent Williamson trudging back to the pavilion after the batsman edged an away-going delivery to be caught at second slip.
Earlier in the afternoon Watling had stayed unbeaten on 105, finishing his seventh evaluation century earlier captain Kane Williamson announced.
It wasn't until Will Somerville entered the attack that things started to happen, the spinner making the breakthrough in the 15th over when he had Lahiru Thirimanne (2) caught by Kane Williamson.
However, it was Harris, the replacement for Cameron Bancroft at the top of the order, who fell first, caught behind off Archer for 8.
Watling lost his overnight partner Colin de Grandhomme early after the tourists resumed the final day's play on 382 for five but went on to stretch their lead to 187 in Colombo.
Watling, who completed his 18th Test fifty, then stood guard with De Grandhomme to take the team to tea at 295-5.
Overnight centurion Tom Latham and Watling continued accumulating runs easily and took their side past Sri Lanka's first-innings total of 244. It all started with Lahiru Thirimanne's run out on the fifth ball of the innings.