John Moonlight scored a try to give Canada its first lead of the game en route to its first win over New Zealand in 29 attempts in the World Rugby Sevens Series.
The Canadians play England later Sunday in the semifinal.
Mike Fuailefau and Conor Trainor also had tries for Canada.
Canada fell behind early against New Zealand when Joe Webber went in for a try immediately from the kick-off. But the Canadians slowly got back into the game when Fuailefau scored to tie it at five.
New Zealand went into the half with a 10-5 lead after a score from veteran Tim Mikkelson.
Moonlight raced in for a try in the second half. A successful conversion made it 12-10. Trainor scored in the 13th minute and Harry Jones converted to give Canada a nine-point lead.
Sherwin Stowers scored late for New Zealand.