Home team Real Madrid tied the clash at 87-87 after Spanish point guard Sergio Llull scored a two-pointer with 19 seconds remaining until the final buzzer.
With only three seconds to go at Madrid's WiZink Center, Olympiacos' Greek playmaker guard Kostas Sloukas scored after a fake, making it 89-87.
Real Madrid still had a chance then, but Olympiacos defended their basket well to secure an away win.
Olympiacos improved to 3-0 in the 2022-23 EuroLeague.
Meanwhile, Real Madrid have a 1-2 win/loss record.
Olympiacos' Greek forward Sasha Vezenkov was on fire as he scored 23 points and grabbed 12 rebounds to post a double-double for the victors.
Sloukas racked up 14 points and made seven assists for Olympiacos. Joel Bolomboy added 11 points for the Greek club.
Dzanan Musa, Real Madrid's Bosnian forward, led his team as he scored 17 points.
Llull and Walter Tavares scored 14 points each for Real Madrid.
Wednesday's results:
ALBA Berlin - Panathinaikos: 94-65
Cazoo Baskonia Vitoria-Gasteiz - Crvena Zvezda mts Belgrade: 92-75
Real Madrid - Olympiacos: 87-89