After the opening session was lost to wet weather, Williamson led the way under the Seddon Park lights as the Black Caps took their lead from 340 to 657 before England finally bowled them out for 453 in the final hour.
England, who have secured series honours after big wins in Christchurch and Wellington, reached 18 for two at the close of play with Jacob Bethell, on nine not out, and scoreless Joe Root at the crease still 640 runs from their unlikely target.
England could also be a man short in their chase as captain Ben Stokes left the contest with a hamstring injury and is not certain to bat.
Tim Southee, playing on his home ground in his final test, got one of the biggest cheers of the day when he came out to bat in the New Zealand tail but holed out for two chasing his 99th six in tests.
The crowd erupted again soon afterwards when Southee fired a delivery down the off side at Ben Duckett and the England opener got a thick inside edge onto his stumps for four.
Fellow England opener Zak Crawley followed for five when Matt Henry trapped him in front, dismissing him for the sixth time in as many innings this series.
The 34-year-old resumed on 50 with New Zealand 136-3 and had a couple of nervy moments, not least an lbw appeal from Brydon Carse when he was on 73 that was turned down but judged an umpire's call on review.
He shared a 107-run fourth-wicket partnership with Ravindra as he patiently moved towards his 33rd test century and seventh in 12 matches at Seddon Park.
Williamson threw off the shackles as he approached the century mark for the fifth test in a row in Hamilton, smashing Bethell's occasional spin straight down the ground for a six to reach the mark from 137 balls.
Another partnership of 92 with Mitchell put the lead well beyond the record successful fourth-innings run chase of 418 achieved by West Indies against Australia at St John's in 2003.
Williamson glided through to 150 before finally departing attempting a sweep off Shoaib Bashir but only finding the substitute fielder in the deep.
Bethell was England's best bowler with figures of three for 72 after removing Mitchell for his maiden test wicket and sending back Southee and Matt Henry with the last two deliveries of the innings.