Wayne Routledge got the only goal of the game six minutes into the second half, tapping in at the far post.
Swansea were a long way short of the form they showed in humbling Valencia at the Mestalla in their first group game, and the visitors would have taken something from the game had striker Goran Karanovic converted a first-half penalty.
The game was hardly helped by the inconsistent and fussy refereeing of Duarte Gomes, but Swansea can now head into the home game with Kuban Krasnodar later this month knowing a win would make them strong favourites to claim a place in the last-32.
But St Gallen will rue failing to take their golden opportunity to cause an upset when it arrived in just the 14th minute.
Dwight Tiendalli was adjudged to have handled in the box, but Karanovic's weak spot-kick was easily saved by Gerhard Tremmel.
To add injury to insult Karanovic was removed at half-time having had no recollection of his miss after being concussed in a collision with Tremmel.
The rest of the first half was overshadowed by the lengthy running repairs administered to Michu after the forward suffered a cut to the head. He missed more than eight minutes of play and ended up getting through five shirts before the night was out.
But Routledge got the decisive strike when Wilfried Bony's shot from Alejandro Pozuelo's pass was only half saved, and the winger had the easy task of finishing.
St Gallen's 12-match unbeaten run and wins over Spartak Moscow and Kuban Krasnodar in this competition suggested they would provide the sternest test Swansea had yet faced in Europe, and so it proved.
Source: PA
Source: PA