Mans Zelmerlow, a 28-year-old from Stockholm, sang "Heroes" to defeat 26 other finalists.
"It was absolutely amazing. I didn't hear it when they first said it," he said, according to the Eurovision website. "I thought Russia or Italy would win it. But then I did it, and I was so happy. My feelings are now all over the place. I am so proud, so excited, so full of joy."
Russia's Polina Gagarina came in second and Il Volo of Italy was judged third.
Australia -- Eurovision said its inclusion was a one-off in honor of the Aussies' love of the camp glitterfest -- came in fifth, just behind Belgium.
At the back end of the competition, even a blazing piano couldn't rescue the competition's Austrian hosts: they tied for last place with their German neighbors. The Makemakes of Austria and Germany's Ann Sophie both scored "nul points" for their efforts.
European heavyweights France and the United Kingdom didn't do much better, scraping together 4 points and 5 points, respectively.
The contest was held this year in Vienna, where 11,000 people watched the final in person at the Wiener Stadthalle.
Eurovision was first broadcast in 1956 and it has been sharing its unique blend of ballads and big hair, politics, patriotism and Europop every year since.
That makes it one of the longest-running TV shows in the world -- with estimated annual audiences of 180 million, according to broadcaster the European Broadcasting Union, arguably one of the best loved.
Winners have included Lordi, a Finnish metal band dressed as Orcs and, last year, Conchita Wurst, a glamorous bearded lady from Austria.
Eurovision's most successful act ever, ABBA, is from Sweden and its composers have been behind many winners over the years.