The 32-year-old Hansdotter clocked an aggregate of 1min 38.63sec, Switzerlands Wendy Holdener taking silver at 0.05sec and unheralded Austrian Katharina Gallhuber bronze (+0.32).
Shiffrin, who initially complained of virus-like symptoms and was sick at the start gate before a disappointing first leg, was 0.40sec off the pace and will miss Saturdays super-G.
She later played down that bout of sickness as "more nerves than anything".
"I dont feel sick right now, I dont think I have a virus. I was thinking that after the first run, but I think it was me making an excuse."
Also Read
"So coming here and skiing the way I did, conservatively, is a huge disappointment. But thats how life goes.
"I know I have the best slalom turns in the world but I didnt put it out in the two runs that mattered.
"Sometimes I think the only person who can beat myself in the slalom is me and I beat myself in the wrong way today and thats a really big bummer."
Dark-horse Gallhuber, just 20 and only ninth-fastest first time out, laid down a stunning second run to put herself in pole.
The Austrian held off Shiffrin and Swedens Anna Swenn Larsson, but then saw Hansdotter and Holdener leapfrog her as they kept their nerve down the Rainbow 1 course in bitterly cold, bright conditions.
- Winning feeling -
===================
Hansdotters gold tops a career that has seen her win just four World Cup races and three slalom medals at world championships (silver 2015; bronze 2013, 2017). She follows Anja Paerson as the second Swede to have won the Olympic title, the first coming in the 2006 Turin Games.
"I knew it would be tough, Mikaela has been so strong this season," said Hansdotter.
"I was maybe a little bit surprised. Its nice for me to beat her for once because she has been beating me so many times."
Hansdotter added: "I felt at the start of both runs today that it was so fun. I had a smile on my face and tried to ski as fast as I could.
"I love skiing and I love racing, to be able to ski at this level is so much fun and now I bring home a gold medal. It is a lot of hard work and a lot of years but it is worth every minute when I am standing here."
"I knew what could happen but I also knew what could go wrong. If you are the last one on the start and you know you can win or get a medal, its not that easy to bring it home," the Swiss said.
"I didnt ski as good as I could in the second run. My legs werent that fast.
Disclaimer: No Business Standard Journalist was involved in creation of this content