Liverpool suffered a first ever defeat against Greek opposition despite an improved display in the second half.
Yiannis Okkas struck the post with a powerful drive before Ieroklis Stoltidis headed in from a free-kick.
The visitors were much better after the break and had an effort from Harry Kewell ruled out for offside.
Stoltidis hit the bar with a header as Olympiakos finished strongly and, although Anastasios Pantos was sent off, they held on for a famous win.
Liverpool looked to have the pace in Luis Garcia and Milan Baros to cause Olympiakos problems on the break - but they saw so little of the ball in the early stages that it did not matter.
The Reds had problems implementing the zonal defence Rafael Benitez prefers and they had a lucky escape when Jerzy Dudek got a finger to Okkas' shot to ensure it thudded against the near post rather than the back of the net.
It was no surprise when Stoltidis got in front of Sami Hyypia and produced a superb header from Rivaldo's free-kick to make it 1-0.
Liverpool might have hit back immediately when Baros looked to be impeded in the area but that was it in terms of first-half highlights for the visitors.
Brazilian maestro Rivaldo showed that he can still produce moments of magic when he rifled in a 30-yard half-volley which whistled past Dudek's left-hand post.
A poor Dudek clearance allowed Grigoris Georgatos to cross and Giovanni headed just wide, although there was a suspicion that John Arne Riise's hand had got the decisive touch to deflect it wide.
Pantelis Kafes should have made it 2-0 from a Georgatos corner but he could not keep his header down and Liverpool went in at the interval relieved to be just a goal down.
Benitez made a predictable change at half time, withdrawing Stephen Warnock, who had endured a torrid first 45 minutes, and putting on Kewell.
And there were signs that Liverpool might just keep their unbeaten record in this part of the world intact.
Defensively they looked more assured and, with Kewell offering more options going forward, the Greeks were on the back-foot.
Kewell had the ball in the back of the net after a lay-off from Baros but a debatable offside call denied the Reds an equaliser.
However, it needed a timely intervention from Riise to cut out a dangerous cross from Georgiadis.
From the ensuing corner Liverpool had another slice of luck when Stoltidis again found room but this time his header crashed against the bar.
Georgiadis was enjoying plenty of time on the ball down the right and he cut in before firing in a 25-yarder which went straight at Dudek.
Liverpool made their final change by putting on Salif Diao for Dietmar Hamann and they soon had a one-man advantage when Pantos was sent off for a second bookable offence after bringing down Xabi Alonso.
Georgiadis had a chance to finish them off when he raced into the box, only to send his effort wide of the far post - but it mattered little to the home fans who were joyous at the final whistle.
Olympiakos: Nikopolidis, Mavrogenidis (Georgiadis 71), Anatolakis, Schurrer, Pantos, Rivaldo, Stoltidis, Kafes, Georgatos (Vallas 84), Giovanni (Venetidis 71), Okkas. Subs Not Used: Giannou, Castillo, Maric, Kostoulas.
Sent Off: Pantos (82).
Booked: Anatolakis, Pantos, Mavrogenidis, Schurrer.
Goals: Stoltidis 17.
Liverpool: Dudek, Josemi (Cisse 73), Carragher, Hyypia, Riise, Finnan, Alonso, Hamann (Diao 82), Warnock (Kewell 46), Luis Garcia, Baros. Subs Not Used: Kirkland, Traore, Sinama Pongolle, Biscan.
Booked: Warnock, Finnan.
Ref: Pierluigi Collina (Italy).