Williamson's 102 provided a rare moment of cheer on a truncated day when play was restricted to 23.1 overs with only 54 runs scored.
England beat New Zealand despite Williamson’s century
The Black Caps skipper fell after guiding his side to a substantial first innings lead as New Zealand reached 229 for four, 171 runs ahead of England with six wickets in hand.
The milestone century, reached with a deft single through the gully off James Anderson, took Williamson one clear of the previous record of 17 he shared with Ross Taylor and the late Martin Crowe.
Stokes will be ready for first New Zealand Test, confirm England
He was still on 100 when the rain swept in for the first time but when play resumed an hour later, after a revised tea break, he added only two more before being trapped in front by Anderson.
Williamson's overnight partner Henry Nicholls progressed to 49 not out with BJ Watling on 17 when rain again sent the players indoors — midway through the second session of the day-night Test.
It never stopped long enough for the game to resume and play was called off four hours later.
Williamson had rebuilt the New Zealand innings from one for eight in their reply to England's 58, to 206 for four when he was eventually dismissed.
He faced 220 deliveries and shared in partnerships of 84 with Tom Latham, 31 with Ross Taylor and 83 with Nicholls.
Nicholls, who started the New Zealand summer needing strong performances to cement his place as the number six batsman, stepped up from his pre-Christmas form when he had innings of 67, 13 and five against the West Indies.
After resuming the day on 24, he batted calmly with Williamson and then assumed the anchor role when the captain departed and he was joined by Watling.
Watling, back in the side after being sidelined by a hip injury for several months, wasted no time settling in as he raced to 17 off 20 deliveries, while Nicholls has faced 143 balls for his 49.
The England bowlers found some movement when they took the new ball one over after the tea break, and within five overs had the wicket of Williamson.
But it was to be their only success with Nicholls prepared to leave anything that did not need to be hit while Watling, with three fours to his credit, was willing to hit anything to push the bowlers off their line.
Anderson was the most successful of the England bowlers with figures of three for 53.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ