Peter Prevc of Slovenia took silver - the first solo jumping medal of any kind for the Eastern European nation since it gained independence in 1991 - and Norway's Anders Bardal collected the bronze.
Stoch - who put in the longest jumps in both rounds - told reporters he had woken up on Sunday with "a big headache" and a higher than usual temperature.
"Our doctors did everything they could to bring me to life and I made it. They did a good job," he said.
He showed little sign of trouble on the brand new hill in the Russian mountains, soaring 105.5 metres in the first round and putting in a respectable jump of 103.5 metres in the second to amass a total of 278.0 points.
"I feel like it's really not happened to me. Did this really happen?," said the disbelieving 26-year-old, who was carried on his team's shoulders after the win.
The victory galvanised the small Polish contingent in the near sell-out crowd, who waved red and white flags, blew horns and bellowed "Polska! Polska!"
Prevc ended up with 265.3 points and Bardal - who won a bronze in the team event in 2010 - amassed 264.1.
Stoch won the large hill title in last year's world championship. He is the first Pole to take Olympic gold since Wojciech Fortuna triumphed on the large hill in 1972.
The modern hill has a flatter in-run than more traditional hills and some jumpers said before the event they found this challenging.
Defending champion Simon Ammann of Switzerland - seeking to become the first man to win five jumping golds - had no luck mastering the hill and ended in 17th place.
"I have a problem with the in-run I never found a solution. Maybe there will be a miracle and I will find a solution," he said.
Ammann won both the normal and large hills in 2010 but Stoch said he was not thinking about his chances in the second individual event.
"In ski-jumping nothing is sure. Some things do not only depend on the jumper - you can just do a normal jump but something can miss and you also can be fourth or fifth ... we will see," he said.
The competition was also a big disappointment for Austria, traditionally one of the strongest jumping nations.
As the team's experienced veterans struggled, newcomers Thomas Diethart and Michael Hayboeck put in respectable performances to end fourth and fifth.
Gregor Schlierenzauer, the most successful World Cup ski jumper in history, finished in tears and 11th place, while Thomas Morgenstern - still recovering from two bad recent crashes - ended 14th.
"The Olympic Games have their own rules. Even though you are a good jumper, you can never be sure you can get a medal," said Austrian men's team coach Alexander Pointner.
The Austrians still have the large hill and team events to regain some of their pride.
Under a new more complicated judging system, the jumpers were judged on both distance and style. Extra points were be added or deducted to compensate for wind conditions.
Image: Kamil Stoch of Poland celebrates winning gold
Photograph: Julian Finney/Getty Images
Take a look at new ice darling, figure skater Lipnitskaya
Sochi Olympics: Hosts Russia roared to first gold
Figure skating: Russians in pole position for team glory
Sochi Games: Independent Indians march under Olympic flag
Luger Keshavan 37th after penultimate round