New Zealand bowled Zimbabwe out for 295 to win the game by an innings and 117 runs, with left-arm seamer Neil Wagner finishing with eight wickets in the one-sided match at Queens Sports Club.
The second and final Test gets under way at the same venue on Saturday.
After three days of brutal domination at the hands of the Kiwis, Williams rose from his sick bed to hit the fastest Test century by a Zimbabwean as he reached three figures in just 106 deliveries.
The left-hander spent the past two days off the field due to illness as New Zealand racked up a first-innings lead of 412, and came to the crease early on the fourth morning with Zimbabwe tottering on 124 for six, still needing 288 runs to make the Black Caps bat again.
Williams added 118 for the seventh wicket with captain Graeme Cremer, who made 33, and went on to make 119 before succumbing to the left-arm spin of Mitchell Santner.
Wagner claimed the final wicket to fall, which gave him a match haul of eight for 103, but Ross Taylor scooped the man of the match award for his unbeaten 173 in New Zealand’s innings.
Wagner used the short ball to especially good effect in the first innings when he returned figures of 6 for 41, bowling Zimbabwe out for 164 to set the game up for the tourists.
“Neil and Trent (Boult) have shown how good they can be, and Neil was showing us he can be pretty creative with the older ball,” said New Zealand captain Kane Williamson.
“It’s useful on surfaces that are not offering swing. That first innings put us ahead of the game, where he showed some hostile bowling on a surface that didn’t offer much.”
New Zealand began the day needing just five wickets to win, and grabbed one of them in the second over when Craig Ervine was caught behind off the bowling of Boult for 50.
Having lost their top four for just 17 runs on the third evening, another Zimbabwean collapse looked likely but Williams and Cremer instead gave the home side a glimmer of hope.
While Williams leapt at any opportunity to score and stroked 21 boundaries, Cremer blocked up an end and made the Black Caps work hard for his wicket.
It took a debatable lbw decision to prise the Zimbabwe captain from the crease after lunch, when he was dismissed by an Ish Sodhi delivery that looked to be bouncing over the stumps.
Williams went to his hundred in Sodhi’s next over, but he became visibly strained thereafter as the toll of his effort became clear.
After Regis Chakabva was bowled by Tim Southee, the centurion attempted one big stroke too many and was caught off the bowling of Santner.
New Zealand went on to wrap up their second-biggest Test win away from home soon after.