Melendo, 20, came on as a substitute and struck two minutes from time to give Espanyol a 1-0 advantage in the Copa del Rey quarterfinal.
Obituaries are usually written when Barcelona lose but following the end of their unbeaten run, the mood is decidedly more upbeat this time.
Real Madrid's Cristiano Ronaldo has been rested by coach Zinedine Zidane for Thursday evening's Copa del Rey quarterfinal first leg at Leganes.
Gerard Pique and Sergio Busquets expect Barcelona to bounce back quickly after their 29-game unbeaten streak was brought to an end by rivals Espanyol.
Atletico Madrid star Saul Niguez said his team still believe they can turn the tie around, despite blowing a 1-0 lead to lose 2-1 at home to Sevilla.
He may be one of the best players of all time, but Lionel Messi doesn't like penalties. His miss underlined a poor night for Barcelona vs. Espanyol.