The Saints' hopes of reaching the playoff rounds were dealt a blow just after the half-hour mark when Ivan Schranz struck to give the Slovakian side a crucial goal in the tie.
The Scottish Premiership side started the second half with far more attacking intent and should have levelled up on 54 minutes, as Gary Miller, with the goal gaping, headed wide.
It would soon prove a costly miss as Schranz bagged his and his team's second of the night to ensure Miller paid a hefty penalty for the earlier opportunity.
Erik Sabo could, and perhaps should, have put the tie beyond doubt minutes later by spurning a gilt-edged chance for a third.
Tommy Wright's side finished the contest in the ascendancy, as David Wotherspoon shaved the bar from range, before Dave Mackay struck what could prove to be a crucial goal in the tie by reducing the deficit in the dying stages.