Austrian veteran Mario Matt negotiated a controversial slalom course to become the oldest winner of an Olympic alpine skiing medal.
The 34-year-old two-time former world champion led after the first run and held on to beat countryman and hot favourite Marcel Hirscher by 0.28 seconds.
Norway's Henrik Kristoffersen, 19, became the youngest man to win an Olympic skiing medal when he took bronze, 0.83 seconds back.
Britain's Dave Ryding was 27th after the first run and struggled at the same tricky gate that caught out a host of big names, including giant slalom champion Ted Ligety, to finish 17th, 4.07 seconds back.
"I knew all about it," said Ryding, 27. "I knew what to do but I got kicked out. It's frustrating because if I hadn't made that mistake I could have done well.
"I'll be kicking myself for the rest of my life. The first run I skied cautiously on the top because it was really bumpy but I was able to charge a bit lower down and finished 27th and stayed 27th.
"I'm still getting better and I'm sure I could have a better result today, but still, that's life."
Hirscher, 24, was bidding to become only the fourth man to hold the Olympic slalom crown, the world title and the World Cup title at the same time, but it was Matt who rose to the challenge best over two difficult runs under the floodlights above Rosa Khutor.
The Austrian, the 2001 and 2007 slalom world champion, clocked 46.7 seconds to lead Sweden's Andre Myhrer by 0.45 seconds after run one, and he watched from the top as a host of the world's best slalom skiers fell foul of a tough course set by Croatian coach Ante Kostelic, father of Ivica and Janica,
When Myhrer, in silver medal position, crashed out at the same treacherous gate, Matt had a 1.28-second advantage over Hirscher and adopted a cautious approach past the tricky section before letting the skis run lower down.
The previous oldest medallist was Norway's Kjetil Andre Aamodt, who was also 34 when he won super-G gold in Turin in 2006.
"I think most people can imagine it is the most impressive day of my career," said Matt, who was 34th in the only other Olympic race he has completed in 2006.
"I tried not to risk too much on the first part and I made it through to the finish.
"You can tell yourself this is just a training run but when it works out like this it is incredible."
Kristoffersen took the crown as youngest Olympic skiing medallist from Austrian Alfred Matt, who won bronze in the slalom in 1968.
Mario Matt's younger brother Andreas won silver in the ski-cross event at the Vancouver Games in 2010.
The two medals for Austria took their alpine skiing tally to nine for the Games to top the rankings. They won three gold, four silver and two bronze, ahead of the USA with five overall while Switzerland, Germany and Norway all won three medals each.