The home side was set a target of just 119 to win after Sri Lanka's second innings ended in bizarre fashion for 170 on Saturday.
But New Zealand then lost five wickets as they struggled to deal with champion spinner Muttiah Muralitharan, who took three of New Zealand's second innings wickets for a match haul of seven for 99.
However, the Test will be remembered for the way the spinner was dismissed to end Sri Lanka's second innings.
The tailender was run out when he completed a single to give Kumar Sangakkara his century and immediately turned and ran back up the wicket to congratulate the mainstay of the Sri Lankan innings.
But Muralitharan did not realise the ball was still in play, allowing wicketkeeper Brendon McCullum the easiest of dismissals, while raising questions about the sportsmanship of the New Zealanders.
The Sri Lankans could claim the run out was not within the spirit of the game.
But New Zealand captain Stephen Fleming said it was within the law and the Sri Lankan paid the price for making a mistake.
"It was pretty disappointing that it takes the gloss off what I thought was a fantastic 100 by Sangakkara, but the ball was still alive and the game doesn't stop when a player gets 100," Fleming said.
"To my mind the ball's still alive and ... certainly in the cut-throat environment of this competition it's a mistake you can't afford to make on their behalf."
It was the third run out in an innings where Sri Lanka needed to build a big score with plenty of time available at the crease, after being placed on the back foot by a bizarre earlier decision when Mahela Jayawardene won the toss.
The Sri Lankan captain chose to bat on what was clearly a seamer's wicket and when they lost their first wicket in the third over it was evident he had made the wrong call.
But Jayawardene said his thinking was to give Muralitharan the last say in the match.
"There was a bit of grass on the wicket but that doesn't mean you're playing only one day's cricket," he said.
"It's five days of cricket and we've got the best spinner in the world in our ranks and we have to give him the best opportunity to win us matches."
Sri Lanka were all out for 154 in their first innings, and managed a slightly better 170 in the second, which is the second lowest score in Test cricket history where one batsman has scored a century.
New Zealand were hoping for an earlier finish, but Sangakkara and bottom order batsmen Lasith Malinga and Muralitharan frustrated the New Zealand bowlers with their stubborn resistance.
The last two partnerships put on 71 runs, 62 of them from Sangakkara who ended unbeaten on 100, while Malinga faced 28 balls without scoring and Muralitharan scored nine from 19 deliveries.
Shane Bond was again New Zealand's main wicket taker, finishing with four for 63 for a match haul of seven for 106 and the man-of-the-match award.
Set a mere 119 for victory, New Zealand still managed to struggle as they slumped from 58 without loss to 68 for 4.
Recalled opener Craig Cumming was twice caught off no balls before being dismissed for 43, matching his first innings effort.
But at the other end, Jamie How went for 11, Mathew Sinclair four and captain Stephen Fleming was leg-before-wicket to Chaminda Vass without scoring as the New Zealanders contrived to put pressure on themselves.
Nathan Astle and Jacob Oram stopped the slide, putting on 35 for the fifth wicket before Astle went with the score at 103, bringing in McCullum to finish off the match in a blaze of boundaries.
The second and final Test in the series starts in Wellington on Friday, Dec 15.
Sri Lanka 154 and 170 (Kumar Sangakkara 100 n o, Upul Tharanga 24; Shane Bond 4 for 63, James Franklin 2 for 34) lost to New Zealand 206 and 119 for 5 (Cumming 43, Nathan Astle 23; Muralitharan 3 for 34, Vaas 2 for 33)