Aritz Aduriz's first-half double, either side of a Roberto Soldado penalty, looked like it would be enough for Bilbao despite Ander Herrera's dismissal on 67 minutes.
But after Tino Costa levelled with just two minutes remaining, substitute Nelson Valdez popped up to head in the winner with barely any time left on the clock.
The on-loan striker's winner ensured Valencia retained their unbeaten home record in a season that has otherwise fallen flat so far.
After suffering a rare derby defeat to city rivals Levante last time out, Los Che began the day level on points with Bilbao and just above the drop zone.
It looked like they might also concede their home record as they fell behind in the first half.
Valencia began well as Soldado hit the post early before Victor Ruiz shot wide from close range.
But it was Bilbao who took the lead on 19 minutes when Aduriz fired in from the edge of the area.
Valencia did not take long to cancel out the early strike as Borja Ekiza handled in the area before being booked for his protests.
Soldado tucked away the penalty but Valencia were on level terms for just four minutes as Aduriz netted for the second time on the half hour.
Inigo Perez swung in a corner that Aduriz poked home from six yards.
Bilbao could have even had a third before half-time but Oscar de Marcos mis-hit his shot from the edge of the area to allow Vicente Guaita to gather.
Valencia boss Mauricio Pellegrino brought on Valdez, on loan from Russian side Rubin Kazan, after an hour and he immediately set about making his mark, heading over moments after coming on.
Bilbao goalkeeper Gorka Iraizoz then saved a Juan Bernat shot with his feet before Herrera was dismissed to leave his side to hold on for 20 minutes without him.
They looked like they might hold on for a first away win too as Iraizoz easily held on to a Costa effort before watching Ever Banega and Valdez fire over his crossbar.
But with time ticking down Costa levelled the scores from close range before the Argentina international found Valdez moments later to head home the winner.