For City this was their first ever win in the Champions League group stages and was vital if they had any realistic chance of progressing to the knockout phase.
But typical City started in sloppy fashion and conceded after just 4 minutes as Giuseppe Rossi’s shot was only parried by Joe Hart and Cani reacted quickest to tuck home the rebound.
The host’s regrouped but looked to struggling for a way through until just before the break and Villarreal’s Carlos Marchena diverted Aleksandar Kolarov's cross into his own goal from six yards with Edin Dzeko lurking behind.
City looked to be running out of time for the winner until Sergio Aguero scored in stoppage time from Pablo Zabaleta’s superb cross.
The Spanish visitor’s may feel aggrieved with that result but City boss Roberto Mancini was seen going berserk on the touchline as the Italian knows how important this result is.
Referee: Pavel Kralovec (CZE)
Venue: Etihad Stadium
Man City scorers: Marchena og 43, Aguero 90
Villarreal scorers: Cani 4
Yellow cards: Catala (VIL), Rossi (VIL), Perez (VIL)
TRIBAL ASKS: Man City may quality for the knockout stages but they are too naive at this stage to progress any further