Jofre Carreras had Espanyol ahead before Ayoze Perez struck twice for Villarreal.
Marcelino later said: "We did a great job, on this pitch it is difficult to concede so little to Espanyol. We were competitive, we created more chances and I think we deserved this victory.
"In the second half we went ahead and we didn't get the counterattacks right to kill off the game. We ended up suffering in those minutes. It was important to win again after losing on Sunday.
"It bothers me that we conceded, but we have to keep working. We defended well today, but their goal was a shame. It was a set piece where we knew what could happen.
"We weren't very intense in that play, the ball passed through a lot of legs but we didn't go to the ground to block. Despite that, I don't remember any great saves from our goalkeeper, in the end some of his plays did happen and we suffered because they pushed, but in general we allowed very little."
Marcelino also said of Ayoze: "He wanted to come and that was the first thing. He's happy and he finds the goal. And when that happens you find confidence, security... but he also scores a lot of goals in training. It's a transfer of daily work. He's intelligent, precise, he dominates the game. In the penalty area he's intuitive, he's helping us a lot."