Former Manchester United winger Bebe's strike in the 67th minute looked to have earned the visitors a point, but a volley from Hernan Perez 10 minutes later secured a crucial win for Constantin Galca's men.
There was 12 minutes on the clock when after a period of sustained pressure the home side broke the deadlock.
Those failings in front of goal were then duly punished as Bebe cut inside from the left and fired his effort beyond the reach of Lopez Sabata Pau.
However, parity did not last for long as Perez sent his cleanly-struck volley into the top left-hand corner of the net.
As the match ticked towards stoppage time Espanyol's Sanchez was handed his marching orders for a second bookable offence, but that did nothing to alter the scoreline.