Having started with Gerard and Alvaro Morata in Wednesday's 1-1 friendly draw with the Netherlands, Luis Enrique reverted back to his striker-less system at St Jakob-Park by recalling Dani Olmo to lead the line.
It was ultimately Villarreal striker Gerard who made the difference for Spain as he got on the end of Sergio Reguilon's left-sided cross and clinically converted from seven yards out – one of 20 shots the visitors attempted.
Luis Enrique's side have scored three goals in their past five games but the coach has stood by his decision to leave out the likes of Morata and Gerard in Basel until the second half.
"Soccer can be like this," he said. "It is a wonderful game but sometimes it does not do justice. A lot of things happened and we tried to play our style.
"We felt that a number nine was not going to be necessary in the first half. We lacked a bit of freshness but I think Switzerland were good.
"We lacked when it came to the most difficult thing – scoring. On the basis of the first half we deserved to win, and on the basis of the second as well. It is easy to say after the game that Morata had to play or Gerard should have played."
Spain have taken one point from their past two Group A4 matches, having lost 1-0 to Ukraine last month, and now face Germany – one point better off after beating Ukraine 3-1 on Saturday – in a final-game shootout for top spot on Tuesday.
"I already have a plan for the Germany game," Luis Enrique added. "We will have to see how the players recover and take that into account.
"But we now know that we need to win or be out, as if it was a knockout game in the European Championship."
Arguably the biggest selection call of all, however, was Luis Enrique's decision to bring in Unai Simon over benched pair David de Gea and Kepa Arrizabalaga in goal for the second match running.
Simon made two saves but was well beaten for Freuler's opener and was caught out in the second half when racing way off his line and failing to get the ball, with Ramos getting back to block Haris Seferovic's shot on the line.
Asked to explain his goalkeeping pecking order, Luis Enrique said: "I have always declared that I am happy with all three of them.
"I will keep calling on them. Unai has been very good."
Gerard's late goal was his fourth for Spain, each being scored in the month of November, and was of particular relief to Ramos following his remarkable double penalty miss.
The Spain skipper was making his 177th international appearance, seeing him overtake Italy great Gianluigi Buffon as the most-capped European male player.
Yann Sommer was equal to both spot-kicks but Luis Enrique is keeping faith with Ramos, who had scored his previous 25 for club and country.
"There is a list of shooters and Ramos is first," he said. "He would take every penalty that was in the game.
"He had been on a good run but football has these moments. We are not going to criticize him now."
Spain are now unbeaten in 10 away games against Switzerland, which is their best such run against any opponent.