The final ODI takes place in Christchurch on Friday at 22:00 GMT.
The pair plundered 187 in 25 overs for the fourth wicket and Taylor kept going until the end, hammering fours and sixes with huge power and authority despite his injury.
New Zealand made one switch, the fit-again Ross Taylor coming in for Mark Chapman, meaning they retain the twin-spin attack with Ish Sodhi alongside Mitchell Santner.
Ross Taylor set the record books on fire with his 181-run knock by recording New Zealand's highest individual ODI score in a run-chase.
Taylor came to the crease with New Zealand having lost openers Martin Guptill and Colin Munro, both without scoring. He hit Chris Woakes for a six and a four in the next over and the game was as good as done.
Later innings of 29 from 23 balls by Jos Buttler and 23 from 19 balls from man-of-the-match Ali helped England to a total which proved to be just sufficient.
But he also found scoring hard as Williamson, back after missing a match with a hamstring strain, used his slower bowlers well through the middle of the innings. England then exerted itself and shut down the run flow for more than an over, tipping the balance of the match in its favour.
Bairstow has struggled to establish himself in England's one-day squad - in 41 matches since making his debut in 2011, he has batted in every position from one to six - but he has been preferred at the top of the order over the past six months, batting 11 times at two since September 2017.
But as soon as Bairstow fell after a magnificent 138 off 106 balls with seven sixes the whole complexity of the match changed and New Zealand swept back in contention.
Led by Bairstow's and Joe Root's centuries, the visitors plundered 335-9 - at the time the second highest score at the University Oval in an ODI. However, Bairstow's wicket triggered a remarkable collapse that saw the tourists lose eight wickets for 46 runs.
Victory still appeared improbable for New Zealand as they were left needing more than nine runs per over off the final 12.
This former New Zealand captain used to be a six-hitting machine for almost half of his career before he changed his game.
He was unlucky to reach a double hundred but then he would be happy to have remained unbeaten and see his side home and survive in the series. It was an outstanding performance from him.