Ruben Baraja, 18, and Mata, 45, put the hosts in front 2-0 before the break. Thierry Henry pulled one back in the 72nd minute but just seconds later Mata scored his second goal and Valencia's third.
Samuel Eto'o made it 3-2 ten minutes before time but the Catalans failed to go further to get knocked out from the competition.
Frank Rijkaard used his normal 4-3-3 formation with Eto'o in front and Bojan Krkic and Andreas Iniesta on the flanks while Henry remained on the bench.
It was just like the first leg as the Blaugrana dominated the game in terms of possession but Valencia packed their midfield and hit them on counters.
Baraja got past Yaya Toure and fired a wonderful strike in the far top corner of Victor Valdes to break the deadlock after 18 minutes.
And once again, Valencia hit Barca on a counter as David Villa, the man who did everything except scoring, set up Mata to double the lead seconds before the break.
Henry came into action in the second half to pull one back connecting with Sylvinho's cross.
Just seconds after, David Silva escaped on the right flank and crossed for Mata who restored Los Ché two-goal lead.
Eto'o revived Barca's hopes with a close range finish to put much pressure on the hosts' defense in the final 10 minutes until the referee blew the final whistle.
Valencia will face Getafe in the final game of the competition.