El Kaabi struck twice in the opening half hour to put the Greek giants in control at Villa Park before Ollie Watkins halved the deficit just before half time.
Moussa Diaby then got Villa back on level terms after the restart, but El Kaabi netted a third from the penalty spot before Santiago Hezze's deflected strike left Villa with an uphill task in next week's second leg.
To compound Villa's frustration, Douglas Luiz would miss a late penalty that makes the task of reaching the final far more difficult for Unai Emery's side.
Frantic start to European semi-final
Although this was the first leg of a European semi-final, both teams were the opposite of cagey, with Villa's Morgan Rogers quickly seeing a shot kept out by Konstantinos Tzolakis from 20 yards out.
Villa then had a goal disallowed courtesy of a foul by Clement Lenglet, and it appeared that Ayoub El Kaabi's goal for Olympiacos would follow the same fate.
However, the forward's strike would stand after a VAR review. El Kaabi held his run perfectly to collect the ball, advance forward and lash an effort past Robin Olsen.
There was a touch of de-ja-vu as Olympiacos doubled their lead before the half-hour mark. El Kaabi again kept himself onside as he latched onto a through-ball, and the Moroccan would proceed to run the ball wide of Olsen before slotting his shot inside the post.
Konstantinos Fortounis went close to making it three for Olympiacos with a long-range effort that fizzed marginally off target, but Villa were able to halve the deficit in added-on time before the break as Watkins found the corner with a low strike having collected a pass from Diaby.
Villa fail to make momentum count
Villa had the momentum heading into half time and that told after the restart as Diaby turned from provider to goalscorer. Leon Bailey controlled a searching pass and picked out the run of Diaby, who was able to somehow find the back of the net from an acute angle.
The expectation was that Villa would kick on and find a way to get their noses in front, yet it was Olympiacos who were soon back ahead from the penalty spot.
Luiz was adjudged to have his arm in an unnatural position, a fair call despite the lack of distance between himself and Panagiotis Retsos, and it allowed El Kaabi the opportunity to step up from 12 yards and coolly send Olsen the wrong way for his hat-trick.
El Kaabi's goal took him to eight for the competition, making him the leading marksman, but it was teammate Santiago Hezze who would put Olympiacos 4-2 ahead with a speculative effort from distance.
From 25 yards, the midfielder tried his luck, and Olsen may have been able to deal with the strike had he not been wrong-footed by a deflection from Ezri Konsa, leaving the veteran stopper with too much to do to prevent another shot from finding the back of the net.
With nine minutes remaining, Villa were handed a lifeline to get back into the contest after Jhon Duran was brought down in the penalty area by David Carmo.
However, after a delay seemingly orchestrated by Olympiacos, Luiz could only hit the outside of the post, much to the deflation of the home support.
While Villa continued to push for a seventh goal of the evening, the visitors used their continental nous to good effect in the closing stages as Jose Luis Mendilibar moved to the brink of a second successive appearance in a European final having lifted the Europa League with Sevilla last season.