Czech Republic's Metodej Jilek claimed silver, while Italy's Riccardo Lorello delighted the home crowd with bronze.
The 23-year-old Eitrem - who became the first athlete to skate the distance in under 6 minutes at the Speed Skating World Cup in Inzell in January - secured Norway's 29th Olympic gold medal in the sport at the Milano Speed Skating Stadium.
He stopped the clock in an Olympic-record time of 6 minutes 03.95 seconds, finishing 2.53 seconds ahead of Jilek.
"I put myself in a favourite position, so the pressure has been pretty high the last couple of days. I managed to pull it off," said Eitrem, who had to recover from a bad start and then wait for the final pair to realise gold was his.
"There were a lot of emotions going through my head, one second I was crying and the next one I was just enjoying the moment."
Eitrem's win made him the third Norwegian champion of these Olympics, after Anna Odine Stroem opened Norway's gold-medal tally with her normal-hill triumph on Saturday and Johannes Klaebo won the men's skiathlon earlier on Sunday.
Competing in his first Olympics, Eitrem ensured there were no surprises despite a field that included Timothy Loubineaud, Jilek, Casey Dawson and home favourite Davide Ghiotto, all considered contenders after strong World Cup performances.
Ghiotto posted the fourth-fastest time, while Loubineaud - who skated in the final pair alongside Canada's Ted-Jan Bloemen - recorded the fifth-fastest.
Drawn in the second-last pair and skating the outer lane alongside 19-year-old Jilek, Eitrem recovered quickly from a terrible opening slip, settling into his rhythm as the crowd roared him on.
"Adrenaline just rushed through my body and I felt like I was struggling to not move. I think that's the reason I had a small accident," he said of his start.
At the finish, he thumped his chest in celebration then waited for the event to finish. "When Timothy and Ted had a few laps to go, I started to realise that I was going all the way," Eitrem said.
More disappointment for Netherlands
His triumph signals a shifting landscape in the men's 5,000m. At Beijing 2022, the now-retired Swede Nils van der Poel won the title, while at the three previous Olympics the distance was dominated by Dutchman Sven Kramer.
This also marks the second consecutive distance at these Olympics in which the Netherlands have missed the podium.
On Saturday, Italian Francesca Lollobrigida powered to victory in the women's 3,000 metres, delivering Italy's first gold of Milano-Cortina and ending the Dutch run of three straight Olympic titles at the distance, with Norway's Ragne Wiklund and Canada's Valerie Maltais joining her on the podium.
Despite their quiet start, the Netherlands remain speed skating's most dominant nation, with a record 48 Olympic gold medals, far ahead of the United States (30) and Norway (29).
Jilek said he understood the scale of the challenge before stepping on the ice with Eitrem.
"I knew he would need an Olympic record to win the race. I knew I had the best pairing I could get," he said.
"We saw it in Inzell too - the same thing happened when he skated the world record. I was really honoured to skate with him. It helped me a lot to race a better time as well."
There was pure joy for 23‑year‑old Olympic debutant Lorello, a Milan-born skater who grew up minutes from the venue.
Realising he had secured bronze, he soaked up every second of the moment, his smile widening as the home crowd erupted for one of their own.
"It was already a dream for me just to be at home - to say I'm going to train on the ice, drive ten minutes and get here," Lorello said.
"But I'm so glad my first Olympics were here, because my grandparents were able to come. They saw it, and with the medal, that made it an even nicer gift."
