Williamson recorded his sixth straight score of 50 or more as his 90 guided New Zealand to 273 for six, and although Zimbabwe's opening stand gave the World Cup finalists a scare, the bowlers held their nerve to restrict the hosts to 235 all out.
New Zealand therefore completed a come-from-behind series victory, having lost the first ODI by seven wickets.
"It certainly wasn't easy today, so the way that the boys stuck in it and put up a competitive total was a really good effort," said Williamson, who was named man of the match and man of the series.
On a dry wicket, New Zealand's batsmen were tested by Zimbabwe's spin duo of Graeme Cremer and John Nyumbu, who took five wickets between them.
Also Read
Off-spinner Nyumbu made the initial breakthrough when he dismissed Tom Latham, and after New Zealand rebuilt to 100 for one, Cremer had Martin Guptill caught at slip for 42 and then spun one through the defences of Colin Munro.
Although James Neesham and Nathan McCullum boosted the New Zealand total with an unbroken stand of 50 from 25 balls, Zimbabwe were on track to chase down the target when Hamilton Masakadza and Chamu Chibhabha put on 97 for the first wicket.
It required a timely intervention from Mitchell McClenaghan to pull things back as he bowled Chibhabha for 32, before Masakadza struck a short ball from Williamson straight to deep midwicket and departed for 57.
"Our batting let us down -- I thought it was a reasonable score to chase," Zimbabwe captain Elton Chigumbura said.
"We had the foundation, but myself and a few other batters failed to put runs on the board. It's something we can learn from."
The two teams will meet again at Harare Sports Club on Sunday for a one-off Twenty20 international, when New Zealand will once again be without Ross Taylor.