Tonga were arguably the better side early on, dominating the breakdown and scrum and forcing a host of penalties.
However, Ben Smith and prop Tony Woodcock both scored first-half tries to give the All Blacks breathing space.
Nehe Milner-Skudder scored twice before Sonny Bill Williams, Sam Cane and Ma'a Nonu applied some second-half gloss.
The All Blacks, for whom centre Ma'a Nonu was making his 100th Test appearance, top Pool C courtesy of four victories and will play the losers of Sunday's Pool D decider between Ireland and France next Saturday.
The All Blacks have now won their last 11 World Cup games in a row, their best ever run in the competition.
Tonga's defeat means they finish fourth in Pool C and Georgia, who finished third, will automatically qualify for the 2019 World Cup in Japan.
Pool C runners-up Argentina, whose last group game is against Namibia on Sunday, will play the winners of Ireland-France next Sunday.
Like the All Blacks, the Tongans perform a traditional dance before every game - the Sipi Tau - which is always a thrill for the crowd. On Friday, the 54,000 souls crammed into St James' Park were treated to two dances at once.
Halfway through the Tongan rendition, what sounded like hissing could be heard coming from the All Blacks ranks before the haka broke out early.
Given the combination of cheers and boos, it was difficult to make out if the crowd appreciated the premature challenge or thought it disrespectful.
Tonga started well, breaking up the New Zealand defence with some snappy passing, forcing a couple of breakdowns and winning a penalty from a scrum.
But it was New Zealand who scored from their very first opportunity, Milner-Skudder, Kieran Read and Conrad Smith displaying deft hands after a stolen line-out before Ben Smith went over for a try in the right-hand corner.
However, Tonga stood firm, fly-half Kurt Morath slotting over a penalty after some sustained pressure on the New Zealand line.
And when New Zealand winger Waisake Naholo failed to take a simple pass when his side had a three-to-one overlap, you sensed the game was on.
Woodcock bulldozed over from close range to extend New Zealand's lead before number eight Read, captaining the side in the absence of the injured Richie McCaw, was sent to the sin-bin after another Tongan assault.
Indeed, New Zealand head coach Steve Hansen will have been greatly concerned by the way his side's pack creaked before the break, with Tonga forcing a rash of penalties at the scrum, winning seven turnovers and scattering the All Blacks with their rolling maul.
However, despite having the Tongans camping out on their line for three minutes before the half-time whistle, New Zealand somehow managed not to concede any more points, although they were very lucky not to give up a penalty try.
Tonga started the second half as they finished the first, assailing the All Blacks line, and they were rewarded with another Morath penalty.
But when man-of-the-match Milner-Skudder went over for his third and fourth tries of the tournament, it effectively killed the game off.
Williams sauntered over under the posts after a cute pass by Aaron Smith, and Cane then barged over from close range before Nonu finished off a sweeping move in the left-hand corner.
Should All Blacks fans be worried?
That New Zealand have failed to blow away any of their pool opponents might worry some of their supporters, but history suggests they should not fret too much.
In the 2007 World Cup, New Zealand scored 309 points and conceded 21 in the pool stages before losing to France in the quarter-finals. In 2003, they scored 282 points and conceded 64 before losing to Australia in the semi-finals.
As such, competitive match-ups against Argentina (26-16), Namibia (58-14), Georgia (43-10) and Tonga might be exactly what the All Blacks needed.