“We bowled short of length and that’s where Latham attacked us,” said India captain Shikhar Dhawan.
“We couldn’t make a breakthrough when the partnership was on. Latham took the game away for us and that’s when the momentum shifted.”
Williamson finished on 94 not out as New Zealand went one up in the ODI series, having lost the Twenty20 series to India.
“It was an incredible knock by Tommy (Latham) -- he was absolutely on fire,” said Williamson.
“We were talking in the middle about just getting through the overs, but then he just flicked the switch.
“It was one of the more special ODI knocks I have seen and it was nice to be at the other end to watch it.”
After being put into bat by New Zealand, India put up 306 and then did not allow New Zealand’s openers to settle as the chase began.
Finn Allen and then Devon Conway edged shots to wicketkeeper Rishabh Pant.
India gave ODI debuts to pace bowlers Arshdeep Singh and Umran Malik, who celebrated with the wickets of Conway and Daryl Mitchell in quick succession as New Zealand laboured to 88-3.
However, it quickly turned into a miserable evening for India’s bowlers.
Williamson dug in with a superb array of shots, including a 79-metre six.
He was well supported by Latham, who grew in confidence as the pair broke the Indian bowling momentum and took New Zealand to the finish line.
Earlier, India’s captain Dhawan put on a superb opening partnership of 124 with Shubman Gill.
Dhawan smashed 13 fours as he made 72 runs off 77 balls before being caught off the bowling of Tim Southee, who claimed his 200th ODI wicket for New Zealand.
India’s run rate slowed as Pant and then Suryakumar Yadav were dismissed, leaving the visitors on 160-4.
Shreyas Iyer steadied the innings with 80 runs, including four sixes.
Hamilton will host the second ODI on Sunday.