Los Rojiblancos began the game just outside the relegation zone, level on points with Alaves in 18th but managed to put some distance between themselves and the bottom three with an important win.
However, with three games of the season still to play, they will need to maintain that kind of form to ensure they do not become embroiled in the relegation scrap once again.
Sevilla looked good for their win, dominating large parts of the match and holding 65% of the possession.
They produced 21 shots and 1.38 expected goals (xG) to Espanyol's 10 shots for 0.61xG
Despite that, though, they found themselves on the back foot in the 56th minute after the visitors scored from their only big chance of the match, with Tryhys Dolan breaking the deadlock.
The home side spent the rest of the match fighting for a way back into the contest and eventually found it in the 82nd minute when Andres Castrin hit the back of the net before Akor Adams secured the victory in stoppage time.
Elsewhere in LaLiga on Saturday, Real Betis collapsed after taking a 2-0 lead against Real Sociedad at Reale Arena to eventually draw 2-2.
Antony opened the scoring for the visitors in the 39th minute before Abdessamad Ezzalzouli doubled their advantage in the 47th minute.
Sociedad were able to mount a late comeback, with Orri Stein Oskersson pulling one back in the 79th minute before Mikel Oyarzabal converted a stoppage-time penalty to rescue a point.
Toni Martinez (51') and Alvaro Rodriguez (72') traded goals as Elche and Alaves drew 101 at Estadio Martinez Valero, while Levante emerged from a cracking clash at Ciudad de Valencia with a 3-2 win over Osasuna.
A Jeremy Toljan own goal in the third minute got the home side off to a terrible start, which got even worse when Ante Rudimir doubled their advantage eight minutes later.
However, a quick-fire brace from Victor Garcia in the 35th and 37th minutes got them back on level terms by the half-time break, with Etta Eyong bagging a late winner in the 90th minute.