Switzerland took the lead after just 57 seconds against a Portugal side playing without Cristiano Ronaldo when Haris Seferovic scored from Silvan Widmer's pass.
Portugal's stand-in skipper Pepe made his 128th international appearance and they were unlucky not to get something from the game with Swiss keeper Jonas Omlin saving from Danilo and Bernardo Silva.
"We can't concede a goal after 30 seconds of the game. It's our mistake," said Portugal coach Fernando Santos.
"We lacked aggression. We would have preferred to stay top of the group, but I have always said that the decisive match will be the one against Spain."
Victory was a welcome boost for a Swiss side who went into the game having lost their previous three matches.
Spain stay top of League A Group 2 with eight points from four games with Portugal a point further back.