Marcos Alonso's header gave La Blaugrana an early lead before Joselu levelled from the spot, while both Jordi Alba and Vinicius Souza saw red as tempers flared between the two rivals in the final exchanges.
Revelling in successfully overturning Robert Lewandowski's three-game ban to have him available for the derby, Barcelona exploded out of the blocks at Camp Nou and needed just seven minutes to open the scoring.
After Alvaro Fernandez did well to thwart Gavi, Raphinha's corner was headed down by Lewandowski to the back post, where Andreas Christensen kept the ball alive for Alonso to score from close range.
From then on, Xavi's side were utterly dominant. Lewandowski had another header kept out by Fernandez, while Ansu Fati and Alonso fired wide of the goal within the first 20 minutes.
Fernandez was called upon once again to keep out Raphinha in the 37th minute, three minutes after Espanyol had threatened through Nico Melamed, but the 21-year-old's powerful effort just went the wrong side of the post.
Boasting a whopping 78% possession and having had 12 shots before the half-time whistle, Barcelona were on a one-way train back to the top of the table, playing with panache and confidence despite only scoring the one goal.
The Blaugrana faithful were seemingly not concerned about their side's chances of blowing that narrow advantage, but failure to capitalise on their opportunities came back to bite the Catalans in the 71st minute.
Goalscorer Alonso went from hero to zero as he was penalized for treading on Joselu's boot - taking it clean off in the process - and the Espanyol striker dusted himself down before sending a low penalty down the middle of the goal, with Marc-Andre ter Stegen diving to his left.
Barcelona's predicament became all the more worrying when Mateu Lahoz - the infamous card-happy referee from Argentina's World Cup quarter-final with the Netherlands - sent off Alba for two bookable offences within four minutes, with his second yellow apparently triggered by something that the left-back said to the official.
The momentum had swung in Espanyol's favour, but chaos continued to reign as Lahoz astonishingly gave Espanyol duo Vinicius Souza and Leandro Cabrera their marching orders only two minutes after Alba's sending off.
Cabrera had clipped Lewandowski's head following a foul on the Poland international, but a VAR review deemed the contact accidental and saw Lahoz overturn the decision, although Souza's second yellow card still stood.
Following the restart after that mind-boggling episode, Fernandez's brilliance came to the fore again as he denied Christensen and Lewandowski in quick succession just before a nine-minute period of injury time.
Barcelona's last-ditch attacks proved futile, but the draw was enough to see them leapfrog Real Madrid into first place on goal difference before they meet Intercity in the Copa del Rey on Wednesday.
Meanwhile, Diego Martinez's Espanyol have risen above Celta Vigo - who they will take on in Tuesday's round-of-32 cup fixture - into 16th place in the rankings.