Lithuania, playing at home in Vilnius on an artificial grass field, opened the scoring in the 61st minute.
After playing listlessly, Switzerland replied with an equalizer from Josip Drmic three minutes later.
Striker Xherdan Shaqiri put the Swiss ahead in the 84th minute avoiding what would have been a humiliating loss to a team that is ranked just 96th in the world by Fifa (Switzerland is ranked 11th).
The win leaves Switzerland in second place in Group E of the Euro qualifying round behind England, which remains undefeated in six games after edging past Slovenia 3-2 in Ljubljana on Sunday.
The Swiss players head for holidays ahead of their next game to be played in Basel on September 5th against third-place Slovenia.
Three days later they will play England at Wembley stadium.
But questions linger after Switzerland's performance on Sunday.
“Against a team of a higher calibre the score probably wouldn’t have been in our favour,” midfielder Granit Xhaka admitted to broadcaster SFR after the match.
“We must find a solution to be more consistent and on the ball from the opening whistle.”