Matt Henry's five-wicket bag helped ensure the hosts took a 3-1 series win to go with their 2-0 Test domination last month.
New Zealand posted 294 for 5 batting first at the popular beachside resort venue with Guptill making 102, before Sri Lanka were all out for 258 with 17 balls remaining.
Sri Lanka captain Angelo Mathews, with a brave knock of 95, had set the scene for a cliff-hanger finish when he led his side to 223 for 5 before the tail folded in six overs for the addition of only 35 runs.
Along with Mathews, Dinesh Chandimal and Milinda Siriwardana played their part in keeping Sri Lanka in with a chance for most of the their innings.
More From This Section
Mathews and Chandimal produced a 93-run stand for the fourth wicket before Trent Boult, making his first appearance in the series, dismissed Chandimal for 50.
After Thisara Perera (15) made a brief appearance at the crease Siriwardana and Mathews cracked 62 off 40 to have Sri Lanka at 223 for 5 with nine overs and five wickets to get the remaining 72 runs.
At the start of the day Guptill capped a remarkable home season with his 10th ODI century, reaching 102 in 109 deliveries to go with his 79, 93 not out, 30 and 27 earlier in the series.
When Mathews won the toss and put New Zealand into bat he had an immediate result with Tom Latham out in the first over without scoring.
Any loose ball was despatched towards the boundary with a Guptill four bringing up their century partnership in 115 balls.
But a lapse in timing by Williamson on 61 led to his undoing when he gloved an attempt to sweep a leg-side delivery from Tillakaratne Dilshan and wicketkeeper Dinesh Chandimal snared the catch.
Taylor brought up his half-century with a six to mid-wicket before also falling to Kulasekara.
Sri Lanka in reply were on the back foot in the third over when Dilshan, marking his 300th ODI, was removed by Boult for five.
Henry bowled Lahiru Thirimanne for two and had Danushka Gunathilaka caught for 15 as Sri Lanka slumped to 33 for 3 after nine overs before Mathews put some respectability into their innings.
Henry, who was only required by New Zealand for three of the five matches, finished with five for 50 to give him 13 wickets in the series, while Boult took three for 43.