Dzsenifer Marozsan broke the deadlock in the second half with a curling effort, after a Melanie Leupolz cross was deflected to her.
Sweden fell further behind when Linda Sembrant turned the ball into her own net from Marozsan’s free-kick, which came back off the post.
Stina Blackstenius pulled a goal back from Kosovare Asslani’s low cross but nevertheless, Silvia Neid was able to end her eleven year reign on a real high and the Swedes had to settle for their first silver medal.
Canada matched their achievement at London 2012 by again taking the bronze medal by beating the hosts.
They were ahead on 25 minutes after Ashley Lawrence ran from box to box before setting up 17 year-old Deanne Rose to score.
Christine Sinclair marked her 250th cap with the second goal on 52 minutes. Jessie Fleming and Rose combined to pick out Sinclair, who controlled the ball before firing home.
Rose was denied by the post and before Beatriz halved the deficit with 11 minutes left, turning her marker off a header from Erika.