Pre-race favorites Aksel Lund Svindal and Bode Miller, both childhood idols for the 23-year-old Mayer, finished fourth and eighth, respectively.
Another skier, now-retired Austrian great Hermann Maier, served as inspiration for Sunday's win. With a young Mayer watching on TV, Maier returned from a downhill crash at the 1998 Nagano Games to win the super-G a few days later.
"I was with my grandpa and we set an alarm in the middle of the night," Mayer said. "That was impressive to me. That made me want to be a downhiller more."
The once-dominant Austrian men's team didn't win a single medal at the 2010 Vancouver Games, but that changed quickly in the first event of the Alpine schedule this time.
"A start like this, this is maybe something we didn't expect," Austria men's head coach Mathias Berthold said. "He seemed pretty confident. I wasn't sure. He's not an experienced guy so you never know what he's going to do."
Mayer was one of the first contenders to come down, with the No. 11 bib, and he trailed Kjetil Jansrud at the second checkpoint but mastered the rest of the course.
"The last races, he was very super-fast in training and he always did something stupid (in races) because he's so young," Berthold said. "Finally, he was able to put it together."
Once the race was over, Mayer closed his eyes as he was introduced to the crowd and then opened them up and jumped onto the top step of the podium, raising his arms in celebration as Austrian Chancellor Werner Faymann looked on from the stands.
"It's amazing to be an Olympic champion," Mayer said.
Mayer's joy came in sharp contrast to Miller's desperation.
After crossing the finish, Miller sat down on his skis with a look of bewilderment on his face. And that was understandable, considering that he had dominated two of the three official training sessions.
"It's tough. I was looking to win," Miller said. "I thought I had a good chance at it. I was well-prepared."
Miller was one of the fastest skiers on the top section but lost speed when he hit a gate on a right turn a bit further down.
With clouds hanging over the course during the race, conditions were different from the sun and shade of the training sessions.
"The visibility has changed a ton from the training run," Miller said. "The middle and bottom of the course slowed so much from the beginning of the race until I went that I thought you have to do something magical to win.
"I didn't really make any mistakes in the middle and bottom of the course," Miller added. "And I lost a ton of time."
Svindal was also fast on top but lost speed when his large frame went soaring into the air over the big jumps lining the rest of the course.
Mayer is short and compact and appeared more aerodynamic over the jumps.
Mayer became one of the more surprising gold medalists in the sport's marquee race. He has never finished better than fifth in a World Cup downhill.
Other surprise winners have included 21-year-old Leonhard Stock, who earned a first career victory in 1980, and Jean-Luc Cretier of France, who made his only career downhill win count in Nagano.
But Mayer led the second downhill training session, was third in the opening session, and appears to have a very bright future. His father, Helmut, won a silver medal in the super-G at the 1988 Calgary Games.
Mayer was not even supposed to be Austria's top contender but he was thrust into that position when Hannes Reichelt was sidelined with a back surgery after winning the prestigious Kitzbuehel downhill on home snow two weeks ago.
Ski-loving Austria has won more men's downhills at the Olympics than any other nation, seven of 18, but the previous one came in 2002 from Fritz Strobl, who happens to be from the same region in southern Austria as Mayer. So is Franz Klammer, who won the 1976 Innsbruck Games downhill.
Mayer has had more success in super-G, including a silver medal at the 2008 junior world championships and two second-place World Cup showings. Those super-G skills suited him well for the Olympic downhill course, which was extremely technical.
Known for his technical skills, Innerhofer was more than half a second quicker than Mayer through the first checkpoint but gradually lost time as he made his way down.
"I'm so happy that exactly on this day I do my biggest and greatest run for all the year," said Innerhofer, who won a medal of each color at the 2011 world championships but hadn't reached the podium this season.
Jansrud won a silver in giant slalom in 2010 and has one career World Cup win, in super-G, plus three podium results in downhill. Last year, he blew out his knee in the opening race of the world championships.
"It's almost unreal being one year away from an ACL injury, and get to hold a medal in my hand," Jansrud said.