With a win in Toronto, Canada will be assured of placing in one of the top three spots in Concacaf qualification for Qatar 2022.
Their most recent World Cup appearance was in Mexico in 1986, where they finished last in their group and failed to score.
Canada led 2-0 at halftime after to goals from Cyle Larin and Tajon Buchanan, before Junior Hoilett and an Adrian Mariappa own goal clinched the triumph.
The sell-out crowd at BMO Field erupted in ecstasy as Canada clinched World Cup qualification for only the second time.
Les Rouges were brought to Qatar in their maiden qualifying campaign under English coach John Herdman, who led the Canadian women's team to consecutive Olympic bronze medals in 2012 and 2016.
"We recently qualified for the World Cup; this is a legitimate football country," Herdman remarked, recalling his time as a youth coach at Sunderland more than two decades ago.
"I don't think they believed us when I first took charge and stated, "We're going to qualify for the World Cup." I'm thrilled for them because they've waited and waited, and they've stuck with us - and now we're going.
"This country has never believed in us, I suppose, because we have given them nothing to believe in. They are now convinced.
"Now is the time for everyone to rally behind football and unite so that we can be a force to be reckoned with."
The United States, Mexico, Costa Rica, and Panama are all vying for the final two Concacaf automatic qualification slots for the 2022 World Cup, which begins on November 21.
Mexico and the United States, who play El Salvador and Costa Rica on Wednesday, both need a draw in their last qualification game to qualify for Qatar.
To finish in the top three, Costa Rica, which is now in fourth place, would need a strong win over the United States and other outcomes to go their way.
In the eight-team table, the fourth-placed country advances to a play-off against the winner of Wednesday's Oceania qualifying final between the Solomon Islands and New Zealand.