The team from Eastern Switzerland scored the game's only goal in the 80th minute when 26-year-old Marco Mathys put the ball in the back of the net.
The result brought a cheer from the team's supporters but it was a bittersweet moment for the Swiss side.
The win was not enough to lift Saint Gallen out of the basement of Group A, topped by Spain’s FC Valencia and Swansea, both of whom advance.
Valencia tied Russia’s FC Kuban Krasnodar 1-1 on Thursday night but the Spanish team had already enough points to stay on top of the table.
FC Thun, another Swiss team playing at home in the Europa Cup qualifiers, stayed at the bottom of its Group G after losing 1-0 to Belgian team KRC Genk.
Genk scored against the team from the canton of Bern on Thursday after 31 minutes with a goal by forward Jelle Vossen that looked offside.