Wilde-Donald Guerrier scored the game winner with a spectacular individual effort in the 76th minute for Haiti, who were already one of the biggest surprises of the 2019 Gold Cup after going 3-0 in the group stage.
Haiti has fluctuated between being cannon fodder and a thorn in the side for opponents over the years, but on Saturday they played the role of spoiler by upsetting a defensively-challenged Canadian side in Houston, Texas.
Guerrier capped the comeback by sneaking behind the Canadian defence then bouncing the ball twice in the air to get in perfect position to one-tap it past goalkeeper Milan Borjan.
Duckens Nazon got the comeback started by scoring in the 50th minute and Herve Bazile, off a penalty kick, tied it in the 70th minute. Both times Haiti took advantage of some sloppy defensive play by Canadian defender Marcus Godinho.
Jonathan David, in the 18th minute, and Lucas Cavallini, in the 28th, scored goals for Canada, who were guilty of getting too complacent once they compiled a two-goal lead.
It was a gut-wrenching loss for the Canadians who won this tournament in 2000 but haven't made it to the semis since 2007.
Haiti next faces the winner of a later contest between Mexico and Costa Rica.