The 24-year-old from Lewisham chased down New Zealand's Hayden Wilde to clinch the win in 50 minutes and 34 seconds.
Yee was just 13 seconds ahead of his rival, while Australia's Matthew Hauser ended the race in a close third.
After claiming his first Commonwealth medal, the triathlete described this as his "greatest achievement ever", telling BBC Sport: "It's the first time I've been able to race in front of my parents for a long time at a major Games.
"I'm just happy. It's bizarre it's me that's doing this and I can feel extremely grateful to be in this situation.
"I feel proud to be a triathlete today, to see so many different nations who I've never raced before and who are doing triathlon for the first time."
Yee is already an Olympic gold medallist, having claimed the mixed relay title in Tokyo. He also won the silver in the individual event.
The athlete also enjoyed recent success in the newly created Super League Triathlon, where he claimed the 2021 Championship Series.
Dame Laura Kenny helps England to bronze
Elsewhere, Dame Laura Kenny claimed she had been as nervous as she was before an Olympic gold medal ride as she helped England to a Commonwealth bronze in the women's team pursuit.
The five-time Olympic champion has endured a traumatic time since the Tokyo Games, suffering a miscarriage and an ectopic pregnancy, but was able to celebrate at the Lee Valley VeloPark as she joined Josie Knight, Maddie Leech and Sophie Lewis to hold off Wales in the bronze medal ride.
They were significantly off the pace set by Australia and New Zealand, who took gold and silver respectively, but with Lewis, 20, and Leech, 19, riding in their first major competition and bigger targets to come at the Euros and worlds later this year, Kenny called bronze "brilliant".
"I've never felt so much pressure to try to win a bronze medal in my whole career," Kenny said. "The fact this is such a young team, I've been lucky in my career to have some brilliant experiences and step on the podium but this is the first taste of it for Maddie and Sophie.
"Going into that final, it could have been for gold at an Olympics I was that nervous…I didn't think I was going to be here and if circumstances had been different I wouldn't be, but to come here and play a part with these girls has been brilliant."
Kenny's son Albie was off visiting the London Transport Museum but this was still a family affair with husband Jason - now on the coaching staff - taking Kenny's bike to the start line.
Jason then turned his attention to the men's team sprint in which the England trio of Joe Truman, Ryan Owens and Hamish Turnbull took silver behind an Australian squad that set a new Games record with a time of 42.040 seconds.
England's quartet of Charlie Tanfield, Dan Bigham, Ollie Wood and Ethan Vernon took silver in the men's team pursuit as New Zealand clocked a Commonwealth Games record time of 3:47.575 to beat them.
It was a moment of redemption for Tanfield, who had a horrible experience at the Tokyo Olympics. Having been drafted into the team pursuit at the last minute following Ed Clancy's snap retirement, Tanfield had quickly fallen off the pace in the first round and then ended up in a crash with a Danish rider.
"In all honesty it feels amazing," Tanfield said. "Before the race I had that in the back of my head. I didn't want that to happen again. It feels really good to see the hard work pays off and you can turn things around."
Australia, having failed to reach a final for the first time since the team pursuit was added to the Commonwealth Games programme in 1974, had to settle for bronze with a win over Wales.
There was women's team sprint bronze for the Welsh trio of Rhian Edmunds, Emma Finucane and Lowri Thomas after they outqualified the England trio of Milly Tanner, Sophie Capewell and Blaine Ridge-Davis - who together won bronze for Great Britain at last year's world championships.
While Wales had set their sights on these Games the England trio have bigger targets ahead - not least next month's Euros - but this was still a disappointing ride
"It wasn't our best performance," Capewell said. "We're coming into this a little bit undercooked, so we had to focus on each of our individual goals."
Scotland's Neil Fachie, piloted by Lewis Stewart, won his fifth Olympic gold with victory in the para-cycling 1000m time trial, setting a new Games record of 59.938 seconds.