Jozabed's wonder strike had fired the visitors into a surprise lead just before the break.
However, former Tottenham Hotspur striker Roberto Soldado teed up Bakambu to level and the Congolese's cool near post finish five minutes from time handed Villarreal just their second win in eight league games.
Victory moves Villarreal to within just a point of Celta Vigo in fourth ahead of their clash with Real Madrid next weekend.
Earlier, Real Sociedad's revival since sacking former Manchester United manager David Moyes continued as they recovered from conceding an early to beat Eibar 2-1.
Borja Baston put the visitors in front, but Imanol Agirretxe levelled before taking his tally for the season to 11 goals in 12 appearances with a last minute winner.