Ulissi (UAE Team Emirates) finished ahead of Enric Nicolau (Quick-Step Floors) and Dimension Data's Tom-Jelte Slagter at the end of the punchy 155km stage from Gstaad to Leukerbad.
Porte now leads the overall standings by 20sec ahead of Sunweb pair Wilco Kelderman and Sam Oomen after previous race leader and BMC team-mate Stefan Kung faltered under the pace set on the late climbs.
"I am just happy to be back racing and to have good form. It wasn't a simple day but this jersey is all credit to my team today," Porte said.
"The team was absolutely superb. They were fantastic all day," Porte said. "It was a hectic start and we covered the first 100km super quick and I don't think it was an easy day for anyone.
"It may not have looked really hard in the final there but we went hard. All of the guys did their part today and I am so happy to have the jersey and keep it in the team. I think when you have such a hard start it's not easy to get going and it wasn't an easy day. So, let's see what the peloton has in store for us tomorrow.
"I didn't expect it to be as hard at the start. We knew it would be difficult but we got to the top and guys were still attacking. Then, we were then going absolutely full gas down into the valley. I think full credit to our team. They controlled it well.
"I think I have pretty good form and I think the proper mountain stages will suit me better than today and maybe even tomorrow but I am just happy to be back racing and to have good form."
It took 60km before a six-rider breakaway group went clear to a three minute lead with the real action starting in the final 40km when Larry Warbasse (Aqua Blue Sport) attacked the break on the penultimate climb. His effort was nullified with 12km remaining as Lilian Calmejane (Direct Energie) took a turn at the front, dangling less than 30sec ahead of the bunch.
With Calmejane's heroics over, Mikel Landa (Movistar) then attacked from 6km out and held a small lead before he too was overwhelmed just metres before the finish by the group containing Ulissi and Porte.
Stage 6 sends the riders on another mountainous 186km route featuring two big climbs before the finish in Gommiswald.