A hat-trick from Hayden Shaw booked New Zealand a semi-final showdown with Pakistan.
The Christchurch-born defender and tournament top scorer made it 11 strikes in just four matches - four more than nearest rival Craig Victory of Australia.
But the winners had to dig deep for their triumph, coming from behind on two occasions.
A Wayne Fernandes' sixth-minute penalty corner put the Canadians in front before New Zealand equalised in the 12th minute with a Shaw penalty.
Five minutes before half-time, Ravi Kahlon drove in a set-piece of his own.
But within four minutes of the interval, Shaw had his second, this time from a penalty corner.
Shaw hammered in the final blow with just five minutes remaining, prompting a frenzied finale.
Canada took off goalkeeper Mike Mahmood with three minutes to go and put defender Mike Lee in a helmet as kicking back so they could throw on an extra outfield player.
But it made no difference as the Kiwis held on for victory.