A double from Ferran Torres helped the much changed Catalonian side to success in the Czech Republic.
Xavi's side were given a few scares in the second half though, as despite having a huge proportion of the ball, they allowed Plzen to score twice, and to significantly out-shoot them over the 90 minutes.
The match had no bearing on the outcome of the group though, as Barca were already condemned to Europa League football in the New Year.
With nothing riding on the game, Xavi made nine changes to the side which beat Valencia at the weekend, as players such as Robert Lewandowski were given a rest in preparation for the tie with Almeria on Saturday.
Pablo Torre was given a first ever start for the club and had a very mixed night, giving away a penalty before scoring the clinching fourth goal late on.
Marcos Alonso got the ball rolling with a very scrappy goal in the opening 10 minutes, before Torres got his first of the night just before the break with the help of VAR after the linesman had wrongly flagged Jordi Alba offside in the build up.
However, with nothing to lose, Viktoria Plzen came out the traps fast in the second half and were by far the better team after the break, as Tomas Chory twice pulled Plzen back into the game after going two goals down.
However, after another fantastic through ball from Raphinha, who was excellent all night, set Torre on his way one-on-one, the 19-year-old made no mistake and sealed the win for Barca, becoming the clubs second-youngest Champions League goalscorer.
While Barca finished third, Plzen end the group with zero points in what was a devilishly difficult group for the Czech champions.
Overall, it is a result that will probably not tell Xavi much about his team given how many changes were made, and the level of opposition, but the performances of Raphinha and Torres, who have fallen somewhat out of favour, will be encouraging.
Since Lionel Messi left the club in 2021, Barcelona have only won four of their 12 Champions League matches, twice to Dynamo Kiev, and twice to tonight's opponents, and have gone out at this stage on both occasions.
Falling into the Europa League last season did not bring them much success either though, as eventual winners Eintracht Frankfurt knocked them out in the quarter-finals.
They now face a potentially tricky preliminary knockout round tie in the Europa League, with sides like Manchester United, Roma and Lazio being possible opponents.
Plzen will turn their attentions solely to domestic matters as they aim to retain their title again this season, and have a crunch fixture against Sparta Prague at the weekend.