Williamson (97) and Taylor (96) provided the backbone of New Zealand's 315-8 in their 50 overs and Sri Lanka were all out for 195 in the 41st over.
The win puts New Zealand 4-1 up in the seven-match series with one game washed out, and captain Brendon McCullum declared himself satisfied with their World Cup build up.
"It was a pretty clinical performance with the bat and I thought the bowlers certainly did a very good job. Overall another step forward for us and we're very pleased with the series win," he said.
But Sri Lanka, still without their injured strike weapon Lasith Malinga, have concerns about the quality of their attack.
More From This Section
"Our concern is with the bowling," stand-in captain Lahiru Thirimanne said.
"We bowled 30-35 overs very good but the last 15 overs we couldn't get the wickets and we also leaked runs. That was disappointing."
There were also problems with their batting with only Kumar Sangakkara appearing at ease in the run chase with 81 off 66 deliveries.
Anderson smacked 40 from 28 balls to support Williamson and Taylor during New Zealand's innings and then took four for 52 with the ball as the Sri Lankan batsmen again showed a lack of fight.