The German goalkeeper saved a weak penalty in the first half before the winger struck soon after the break to continue a fine start to the Europa League for Michael Laudrup's men
The sides had gone in level at the break at the Liberty Stadium after Swans goalkeeper Gerhard Tremmel saved Goran Karanovic's penalty following a Dwight Tiendalli handball.
However, Wayne Routledge's close-range finish after 52 minutes was enough to give Michael Laudrup's men back-to-back wins in Europe.
Swansea made four changes from their opening win over Valencia, with captain Leon Britton and winger Routledge among those to make the starting XI. The Swiss were unchanged from their last Europa League outing, a 2-0 win over Kuban Krasnodar.
|By Tim Poole
Two games have yielded two wins for Swansea City in the Europa League but St Gallen did not prove light opponents for Michael Laudrup's men on Thursday night.
The Swans prevailed thanks to a second-half winner from Wayne Routledge and a first-half penalty save from Gerhard Tremmel, though their Swiss opponents offered plenty of food for thought during a well-contested encounter.
In the end, Laudrup and his side will be delighted with the result and grateful to Alejandro Pozuelo and Wilfried Bony, who teed up Routledge for the winner, as well as goalkeeper Tremmel for a vital stop from the spot.
The visitors spurned a golden opportunity to move ahead when Karanovic missed a penalty after 15 minutes. Roberto Rodriguez's cross struck the arm of Tiendalli but the spot kick was easily saved by Tremmel after a staggered run-up.
Marco Mathys went close shortly after as the visitors gradually grew into the game, rolling an effort past the onrushing goalkeeper and marginally wide of the far post.
Swansea came close to taking the lead when Lopar pushed a Jordi Amat header onto the post after 23 minutes following a teasing delivery from Ben Davies - however, nobody was free to poke the loose ball home.
Mathys again tested Tremmell just after the half-hour mark, with the German fumbling his fierce long-range effort, before Wilfried Bony had the last chance of the half. After linking well with Michu, the Ivorian fired just wide of Lopar's left-hand post.
The home side eventually took the lead when Bony's effort from the right was parried away by Lopar into the path of Routledge. The winger latched on to the loose ball and poked in from close range to edge the home side in front seven minutes into the second half.
Substitute Alhassane Keita almost provided a swift reply after but he put the ball over the bar after expertly controlling a long ball from Lopar.
Nathan Dyer would have made it two but for a Lopar save 12 minutes from time before Stephane Nater struck Tremmel's left-hand post for the visitors.
However, the home side saw out the tie to move top of their group, with Laudrup's charges yet to concede a goal in Europe this season.