Cort was the best of a 21-man group sprint to the finish line outside of Muscat's Ministry of Tourism, with Giovanni Visconti (Bahrain-Merida) second, Alberto Bettiol (BMC Racing) third and race leader Greg Van Avermaet (BMC) fourth.
The victory, his first for Astana, came after the 25-year-old underwent surgery for a broken collarbone in early December following a nasty training crash that hampered his move from Mitchelton-Scott.
"In the Dubai Tour, I knew I was on great form but that surprised me that I was that good already," Cort Nielsen said.
"I thought it was going to maybe be a smaller group. I actually believed that if I was there I'd be coming back on the descent but I think we had some headwind on the final climb and then that helped the group to be a little bit bigger and it was not raced too aggressively.
"I was able to get my arse over there and the rest of the big sprinters, they didn't."
The 117.5km race from Al Sifah was the shortest of the six-stage tour but varied with stinging uphill drags and short but steep ascents from kilometre zero.
The race was defined over three ascents of the Al Jabal Street climb that whittled down the bunch and shed the pure sprinters early.
Australian Nathan Haas and his Katusha-Alpecin team set the tempo on the second ascent, reducing the gap to escapees before the race came together on the final run through.
Astana, which has been knocking on the door with minor places all week, then finally answered an almost tireless BMC Racing squad in the remaining 15km.
"We have a really strong team here, we are giving each other some chances and today it was my turn," Cort Nielsen said.
"They did very, very well and I'm very happy for the finish with [Alexey] Lutsenko doing an amazing job, and also [Omar] Fraile doing everything he could to keep the group from behind coming back.
"Both of them, they could have been possible winners in a group like that, so I'm very happy that I finished it off when they trusted me, and also that they sacrificed everything for me. That was nice."
Lutsenko currently sits second overall, nine seconds in arrears of van Avermaet, but piloted his Danish teammate to the line yesterday.
"Lutsenko did very, very well both pulling the guys who attacked back and also doing a lead-out. I only really had to push the last 200m, he kept me out of the wind and I had the legs to finish it," Cort Nielsen said.
Haas placed sixth on the stage to remain third overall ahead of today's run to Green Mountain, which should decide the race.