As round-robin leaders, Sweden had last stone advantage in the first end against Great Britain, but it was David Murdoch’s rink that opened the scoring with a single point steal in the second end.
The Swedes took a 2-1 lead in the third end, scoring two points when Edin drew with his last stone, before Great Britain levelled again in the fifth.
The two rinks continued to trade points, and by the end of the seventh end were locked together at 3-3.
Great Britain then moved ahead again in the eighth, but their 4-3 lead was then overturned thanks to a two-pointer from the Swedes in the following end.
At 5-4 down, the pressure was on Murdoch in the final end, but he managed to hold his nerve. With a British stone already on the button, he managed to produce a two-pointer with his last stone to give his rink a 6-5 victory.
Great Britain will feature in the final for the first time since they won gold at the inaugural Olympic Winter Games in 1924.
“It’s just incredible,” said Murdoch after reaching the final. “I’ve been trying for 12 years to get an Olympic medal and now we’re going to get one. Words just can’t explain. It was an incredible team display and we’re just so happy to make the gold medal game.”
Sweden skip Niklas Edin offered no excuses. “Obviously we're not feeling good,” he said. “We didn't come up to our normal standard and didn't figure out the ice till the last half of the game and that was too costly.”
Canada's 10-6 win over China in the other semi-final means that their men's teams have reached every Olympic final since curling was reinstated to the Winter Games programme in 1998.
After a cagey start, Canada imposed themselves to take a 4-2 lead into the break. In the sixth end China drew level, but that sparked an inspired retort out of Canada skip Brad Jacobs, who managed a double take-out for three points in the seventh to put his rink 7-4 up.
China battled back yet again in the eighth end, when their skip Rui Liu reduced the margin to 7-6. But Jacobs was now on fire, and he scored another three pointer in the ninth to put Canada 10-6 up and finish the scoring.
“It's unbelievable, this was the goal,” said Jacobs. “We wanted to get into the play-offs and then put together a good game in the semi-final, and now we get to play in the final - it's awesome.”
China's Liu was philosophical in defeat: “Although we lost the game we performed at our best,” he said. “Team Canada are so strong and we made some small but crucial mistakes and they led to us losing the game.”