Fermin Lopez opened the scoring with his first goal of the game after just seven minutes.
Lopez was on target again after 39 minutes ahead of a 53rd minute Auoub El Kaabi penalty to reduce the deficit.
A red card shown to midfielder Santiago Hezze in the 57th minute turned the tie on its head though as Barca soon fully took control.
Lamine Yamal weighed in with a questionable penalty of his own on 68 minutes before a brace from Marcus Rashford (74', 79') either side of a third goal on the night for Lopez, after 76 minutes.
Barca moved onto six points with two wins from their opening three Champions League matches, while Olympiacos have one point from three games played in this year's competition.
Head coach Hansi Flick said on Mundo Deportivo after the game that it was great to record such a comprehensive result ahead of their "huge game" against Real Madrid on Sunday.
He said: "Fermin put in a great performance. Three goals, the first one was very important to open the scoring.
"He's a player who has it all: he's dynamic and we need his speed too.
"The first thing is that we won today, which is the important thing, and that has to give us confidence for that game. It's a huge game.
âThere's not much time to waste. We're going to recover, and we have to be ready.â
Yamal was withdrawn for Roony Bardghji after 75 minutes but Flick says the young star is ready to face Real this weekend.
"He has no physical problems. For him and for everyone, it's an important victory. On Sunday, he'll be another Lamine, and he will be at 100 percent," he said.
"Last year, he performed very well in the big games, and I have no doubt heâll do it again.
"El Clasico is a very important game, but not just for Lamine, for the whole team. We have to prepare well for this game."
Olympiacos manager Jose Luis Mendilibar slammed the referee for his contribution to the tie, saying: "The second yellow card is incomprehensible to me.
"You have to do a lot more to get a card. And then to top it all off, the penalty against us for the third goal.
"When you come to these fields, they're not going to give you anything. And in our case, they took it away from us.
"There was a bit of everything. They went into halftime up 2-0. They took advantage of two mistakes we made.
âIn the first half, we had chances to score. We competed well. In the second half, we got back into the game with the goal, but it didnât last long.â