City produced another European performance far removed from their free-scoring Premier League form but finally snatched their first win in the competition with an injury-time Sergio Aguero strike.
Robert Mancini's men fell behind after just four minutes at the Etihad Stadium and needed a Carlos Marchena own goal to get back into contention in their third Group A game.
They were laboured throughout the second half but Milner is not concerned about that now after substitute Aguero's late heroics changed the complexion of City's European campaign.
The 25-year-old, himself a late substitute, said: "That is what we needed to do, get the three points. It was important that we did that.
"We left it late but we got the three points and that is all that mattered.
"We have played better. We didn't start the game well but we had the belief to keep going and do the right things, and it paid off in the end.
"Even if it takes until the 93rd minute to get the winner, you just have to keep doing the right things."
City now face Villarreal again in a fortnight knowing they are firmly back in contention to progress from Group A.
They remain third in the standings but just a point behind Napoli and three below Bayern Munich after those other two sides drew in Italy last night.
Milner, 25, added: "It is a very strong group, every team is capable of beating each other.
"It was important we got this first win and, with three games to go, it is down to us now."
Premier League leaders City now turn their attention to Sunday's eagerly-anticipated derby against arch-rivals Manchester United at Old Trafford.
Milner said: "We know it will be a tough game, a great atmosphere, a great occasion, but if we keep playing as we are I am sure we can get the win."