The Selecao, who had not topped the group at any point prior to this evening, came out on top through an unfortunate Johan Djourou own goal and a well-worked Andre Silva strike either side of half time.
A draw would have been enough to take the Swiss through, but their 10-match winning run came to an end to set up a two-legged playoff next month to determine whether they will join their opponents in Russia.
Portugal, who had star man Cristiano Ronaldo back in their ranks from the off this evening, had the better of the first half without creating a great deal.
Andre Silva was able to test Yann Sommer down low with a deflected attempt early on, which proved to be a rare shot on goal at either end in a fairly uneventful first half.
Sommer had to pull off an even bigger stop just after the half-hour mark, this time to keep out a bullet strike from Bernardo Silva that was heading for the top corner.
There was to be a breakthrough shortly before the interval, though, as Djourou put into his own net when attempting to clear Eliseu's dangerous left-sided cross.
Joao Mario, Sommer and Djourou got into a tangle when attempting to get on the end of the cross, with the ball cruelly trickling over the line after contact from the former Arsenal man.
Switzerland, whose last defeat to Portugal came in 1993, showed more attacking intent in the early stages of the second half and came close to a leveller when Xherdan Shaqiri found the target from a long-range free kick.
The Selecao may have been fortunate with the manner of their opening goal, but there was nothing lucky about the second when it arrived 57 minutes into the contest.
A flowing team move culminated in Bernardo Silva squaring for namesake Andre to convert at the back post with his second touch, putting his side on the brink of automatic qualification.
Shaqiri flashed a shot wide as La Nati looked for a route back into the match, though it was Portugal - into their fifth successive World Cup - who looked the more likely to score in the remaining minutes.
Pepe hit a shot right at Sommer from a good position, while the Swiss keeper stood his ground to thwart Ronaldo after he was played clean through on goal.
Portugal, who ended the campaign with nine successive wins, failed to add to their goals tally but they picked up the result required against a flat Switzerland side.