The 28-year-old was 1.64 seconds behind after the morning's downhill run but produced a superb slalom leg to edge out Croatian veteran Ivica Kostelic who had to settle for Olympic silver for the fourth time in his career.
Viletta, 28, became the first Swiss to win the super combined title at an Olympic Games.
Slalom specialist Kostelic was 0.34 seconds behind with Italy's Christof Innerhofer 0.47 seconds back in the bronze medal position.
"I can't describe what is going through my mind now," Viletta, who performed a hand stand at the finish once he knew he had won, told Swiss television.
"It's absolutely unbelievable, really difficult to understand it now for me, just amazing."
"I was surely not a favourite. I guess the snow conditions and the course setting from Ante Kostelic were perfect for me yet I still can't explain how I could ski so fast this afternoon. I'm the most surprised from that result I guess."
Kostelic had looked slight favourite for gold when he set the seventh-fastest downhill time but again suffered an Olympic near miss. The former slalom world champion was not too disappointed, however.
"This is great reward for me and my team given that I have really struggled this season," the 34-year-old Kostelic, whose dad Ante set the slalom course, told Croatian TV.
"I felt I had a really good chance to win the gold medal after the downhill part of today's event, it was one of the best downhill runs in my career.
"But in the end I am delighted with a silver medal because I thought would miss out on a podium finish after the slalom run, where I was below par because the course got soft and mushy."
Kostelic has now won more Olympic silver medals than any other Alpine skier.
An unpredictable and nerve-racking slalom leg brought several crashes and disappointment for some of the pre-race favourites including American duo Bode Miller and Ted Ligety.
Miller, looking to emulate his gold in the super combined in Vancouver, finished sixth after crucial mistakes in both the downhill run and the punishing slalom course.
World champion Ligety could only manage 12th.
Norway's Aksel Lund Svindal, who like Miller missed the podium in last Sunday's showpiece downhill, suffered more disappointment as he slipped from sixth to eighth.
His compatriot Kjetil Jansrud, who won the downhill section, battled grimly to hang on in the slalom but ended up fourth.
Eight of the top 30 failed to finish the slalom course.