It marks a first Olympic gold in the competition for the Canucks, who won successive bronze medals in London and Rio.
The game went to extra time after Canada’s Jessie Fleming equalised from the penalty spot to cancel out Stina Blackstenius’ opener.
Midfielder Julia Grosso scored the winning penalty in the shootout as Canada won 3-2.
In a game of few chances, Sweden’s Blackstenius opened the scoring in the 34th minute, beating goalkeeper Stephanie Labbe with her low, first-time strike from Kosovare Asllani’s cross.
But Fleming equalised from the penalty spot after veteran forward Christine Sinclair was fouled by Amanda Ilestedt.
Referee Anastasia Pustovoytova initially waved away Canada’s appeals, but the Russian pointed to the spot after the video assistant referee showed the Canadian was kicked from behind as the pair challenged for a loose ball inside the box.
With the scores level after 120 minutes, both sides looked nervous as they lined up for the shootout, which lacked real quality as seven of the 12 penalties either missed or saved.
Nathalie Bjorn and Olivia Schough scored from the spot for Sweden, but Grosso won it for Canada after Fleming and Deanne Rose also converted their spot-kicks.
Sweden have taken the silver in successive Olympic women’s football finals after their Rio 2016 loss to Germany.
Canada midfielder Quinn is the first openly transgender athlete to win an Olympic medal. Canada and Quinn won bronze in Rio 2016 before Quinn came out in September 2020.
The victory is a first major title for Canada boss Bev Priestman, who was born in County Durham and coached England’s women’s under-17 squad before becoming Phil Neville’s assistant coach with the senior team from 2018-2020.
She was appointed head coach of Canada in October 2020 after previous spells coaching their youth teams.
On Thursday, the USA beat Australia in a seven-goal thriller to claim the bronze medal.