cross-country 30km pursuit in the Vancouver Winter Olympics on Saturday.
Compatriot Johan Olsson, who had led the race since from the halfway mark, took bronze with Germany's Tobias Angerer finishing with silver.
The 24-year-old Hellner crossed the line in one hour 15 minutes 11.4 seconds after
the two-legs of the course with Angerer at 2.1 seconds behind and Olsson, who led
for the second half of the race, at 2.8 seconds back.
It was Sweden's second cross-country gold of the Games after Charlotte Kalla won the women's 10km freestyle.
Olsson was in the lead at the 18.75 kilometre stage and held it with less than four kilometres to go before Hellner made his bid for gold–and held off his rivals as the
finish line approached to claim his first major title.
Hellner said he had hunted down Olsson in the closing stages and described his race as "perfect".
"It was excellent. The perfect race and I was very happy. I felt very strong," he said.
"I felt that we could catch him (Olsson), but we were trying to keep the pace down a little so he could get more seconds and go for gold."
"I was worried, but when I felt the power in my arms and the strength in my legs in the end I felt very good confidence. It was pretty easy at the end."
Germany's Angerer said the best man won the day.
"I'm very happy with the silver medal because Marcus was a little bit stronger than me and I have to accept it," said the German.
Olsson said he knew his lead would eventually see him overtaken by the top skiers.
"Twenty-five seconds is not enough with a bunch like that, but I was not going to give up," said Olsson.
Canada's Ivan Babikov earned a loud cheer from the crowd at the finish line as he came fifth, 9.1sec back, in front of his home fans at Whistler Olympic Park with three Canadians finishing in the top 10.
World Cup leader Petter Northug of Norway finished a disappointing 11th at 41.7 seconds behind, while Lukas Bauer of the Czech Republic, who was also a favourite for the title, was seventh at 13.8 seconds back.