Wurst, sporting high heels, butterfly eyelashes and a full beard, topped the Netherlands' modern-country duo the Common Linnets, who sang "Calm After The Storm". Sweden's Sanna Nielsen came in third with her new-age pop song "Undo".
"For me, my dream came true," Wurst, 25, whose birth name is Tom Neuwirth, told a news conference after the win. "But for our society, it just showed me that there are people out there who want to go into the future and go on, you know, not stepping back or thinking in the past."
Wurst, Austria's first Eurovision winner since 1966, received the biggest cheers from the audience but also stirred controversy in some countries.
Online petitions were started in Belarus, Armenia and Russia - whose government passed a law last year banning "gay propaganda" among minors - to have Wurst removed or edited out of broadcasts in their countries.
"We did it. It is the most amazing thing. But I knew she would win. I just knew it," Austrian fan Damel Saric told Reuters. "I have travelled to Copenhagen just for this moment".
The Eurovision competition, which has been held annually since 1956, was created to help foster unity after World War Two and is meant to be non-political. But political strife slipped between the cracks at this year's contest.
Many in the audience booed when the Russian contestants, the 17-year-old Tolmachevy twin sisters, were presented at Saturday's opening ceremony and again when they were awarded points from other, mostly neighbouring, nations.
It was widely speculated that Russia's entry could suffer for the country's annexation of Crimea in March and the government's intransigence on gay rights. Eurovision is hugely popular in the gay community.
"The two Russian girls are sweet, and it is not their fault. But this is a party for everybody. Russia doesn't get that," said one of the booing spectators, a gay Dutch fan who identified himself as Xander.