Raphinha also scored for Barcelona, who a week ago had routed Real Madrid 4-0 in the clasico at the Santiago Bernabeu Stadium.
Barcelona are now nine points ahead of Madrid, whose game at Valencia on Saturday was postponed because of the deadly floods that killed more than 200 people in southern Spain last week.
The game between Villarreal and Rayo Vallecano also was postponed, as were three second-division games scheduled to be played in the region this weekend.
The victory extended Barcelona's 27-match unbeaten streak against Espanyol in the league. Espanyol, sitting in 17th place, have lost six of their last seven league matches.
Olmo scored his double in his return as a starter after hurting a hamstring on Septmber 15 against Girona. He had come off the bench in the team's wins against Bayern Munich in the Champions League and Madrid in the Spanish league.
"I was excited about coming back," Olmo said. "I'm feeling well. It was important to keep winning."
He put Barcelona ahead in the 12th minute from close range after a neat cross by Lamine Yamal with the outside of his left foot. Olmo's second goal came with a strike from outside the area in the 31st.
In his first season with Barcelona, Olmo now has five goals in five matches.
Raphinha added to the lead in the 23rd by redirecting the ball into the net with one touch after Marc Casadó's long cross into the area.
Barcelona have outscored their league opponents 40-11 in 12 matches. Madrid have the second-best attack with 21 goals scored.
"We are a team that can score a lot, not only with our strikers but also with the players in the second line," Olmo said. "We play very direct and create many opportunities."
Espanyol thought they had moved closer in the 27th but Jofre Carrera's goal was called off after video review because of offside. Theyalso had a goal by Álvaro Tejero disallowed for offside in the 58th, then Javi Puado finally scored a goal that counted in the 63rd.
Before the match there was a moment of silence in honour of the flood victims, which has taken place at all league matches this weekend.
Giuliano Simeone, son of Atletico Madrid coach Diego Simeone, scored his first goal with the club in the team's 2-0 win against Las Palmas.
The goal came more than 20 years after Simeone's last league goal with the club as a player.
Alexander Sorloth netted Atletico's second goal, helping move the club back to third place, 10 points behind Barcelona.
Sixth-place Athletic Bilbao drew 1-1 against Real Betis, while 10th-place Real Sociedad won 2-0 at Sevilla with goals from Takefusa Kubo and Mikel Oyarzabal.