The Eredivisie leaders produced a strong second-half display to grab the advantage in the tie, but Mehmet Topal's away goal gives the Spanish side hope
Brett Holman opened the scoring against the run of play from a corner, but the hosts were pegged back early in the second half through a Mehmet Topal header.
Maarten Martens struck the winner late in the game, leaving the Spanish side needing a victory at the Mestalla to make the semi-finals.
Adil Rami's suspension forced Valencia boss Unai Emery to a defensive reshuffle, with Ricardo Costa starting in central defence alongside Angel Dealbert, while Diego Alves was preferred in goal to Vicente Guaita.
The home side started the brighter of the two teams and had a claim for a penalty turned down in the sixth minute, when Dealbert appeared to hold back Jozy Altidore as the American striker looked to get on the end of Brett Holman's cross.
However, the visitors, led by their talismanic striker Roberto Soldado, were always a threat on the counter, and the former Getafe man nearly capitalised on sloppy play from Ragnar Klavan but his shot from a tight angle could only trouble the side netting.
The best chance of the opening exchanges fell to the Valencia No. 9 immediately after that miss, but his snap-shot from Jordi Alba's cut back was saved well by Esteban Alvarado.
With Mehmet Topal and Tino Costa dictating play in midfield, the visitors then began a sustained spell of pressure and AZ had to rely on some last-ditch defending to keep out efforts from Alba and Antonio Barragan.
While the Eredivisie leaders struggled to keep possession for most of the opening 45, they staged a smash and grab in the dying seconds of the first half as poor marking from the visitors allowed Holman to volley a neat finish from a Martens corner.
Valencia hit back immediately after the restart, though, as a looping cross from Ricardo Costa was headed past the outstretched arms of Alvarado by Topal.
Soldado then drew back-to-back saves from Alvarado, as Valencia went in search of a potentially decisive second away goal.
AZ's main weapon up front was their giant striker, Altidore, whose finishing failed to match his industry as, under pressure from Dealbert, he could only tamely head a cross straight at Alves.
Jeremy Mathieu then went on a marauding run down the left before pulling back for substitute Jonas, but the Brazilian skewed his shot wide of the goal.
The Dutch side came more and more into the game as an attacking force in the closing stages and eventually regained the lead as Holman's low cross in to the area was sidefooted past Alves by Martens to bring the score to 2-1.
AZ came close to extending their lead further soon after, but Adam Maher's piledriver went inches wide of the goal as Valencia saw off the final minutes to leave themselves needing a victory at the Mestalla next Thursday to progress.