A stunning first half display saw Roberto Soldado put Villarreal ahead early in the first half.
But the second half was Madrid’s show, but they could do nothing.
“It was a half for each team. We were a bit more lucky than Real Madrid,” Marcelino told reporters after watching his team consolidate fifth position and move to within three points of Rafael Benitez’s men.
“If we can compete this way against a top team, we have to be conscious that we can do it always.
“There were matches that we were under our own level and other ones – too much under our level.”
Match-winner Soldado also felt luck played its part, with Villarreal unable to press Madrid high up the field as they did during the opening period.
“We [expressed ourselves] a lot in the first half and got the goal,” he told television reporters. “In the second half we had to be back [behind the ball] and to defend a lot. We were lucky that they were not accurate.
“If you want to hurt Real Madrid you have to win the ball in their half of the field and in the second half we had problems with the counter attack.”