Ramon Zenhaeusern of Switzerland won silver, 0.34sec behind, and Michael Matt of Austria the bronze after his countryman Marcel Hirscher and then Henrik Kristoffersen of Norway crashed out.
It later transpired that Kristoffersen vomited before he started his ill-fated second run.
Myhrer, at 35 years and 42 days, becomes the oldest man to win a slalom Olympic medal, breaking the record set by Austria's Mario Matt -- Michael's brother -- in 2014.
He also follows his "idol" Ingemar Stenmark, who won the slalom and giant slalom in 1980, as only the second Swedish man to claim a Games alpine skiing crown.
More From This Section
"I took a medal in Vancouver (2010), a bronze, but I've been always dreaming about the gold medal and now it's a reality and I'm totally blown away."
Myhrer, who clocked a winning combined time of 1:38.99, was flattered to be talked about in the same breath as Stenmark.
"He's like an institution in Sweden and one of the greatest athletes in Swedish history," he said.
"To be named alongside him is a great honour for me. He was my idol since I was growing up, to be named alongside him is simply amazing."
- Hirscher crashes out -
=========================
The 23-year-old Kristoffersen went fastest in the morning, just ahead of Myhrer, and looked to have one hand on the title.
But nerves appeared to get the better of the Norwegian, skiing last, and his dreams of a first Olympic gold evaporated when he failed to finish his second run.
Kristoffersen, who won silver in the giant slalom in Pyeongchang, refused to blame his vomiting at the start.
"I'm always sick. I've been sick for four days. A little cold, didn't affect me at all. I usually puke before the start, anyway."
Kristoffersen's dramatic demise came after Hirscher crashed out in the morning leg, ruining his hopes of a golden hat-trick in South Korea.
Hirscher, 28, failed to find his rhythm on a course set by his own coach, Michael Pircher, and eventually missed a gate, failing to even make the second run.
Hirscher -- who had already won the alpine combined and giant slalom at these Games, his first individual Olympic titles -- revealed he had never been comfortable in the lead-up to the slalom, even in training.
"I had absolutely no confidence on this kind of snow. I skied really badly. This is what also can happen and is part of the game, part of the sport.
"You have success and sometimes you have not the best days."
Hirscher had been aiming to become only the fourth skier in history to win a third gold medal at a single Olympics, joining Austria's Toni Sailer (1956), Frenchman Jean-Claude Killy and Croatia's Janica Kostelic (2002).