Sergio Aguero, the man who kick-started City's Champions League campaign back in October, stepped off the bench to shoot the Blues towards a place in the last 16 of the Europa League.
But it was rght on time to ensure that Porto, having led inside half an hour, will start second favourites when the teams meet again at the Etihad Stadium next Wednesday night.
So far, so good. There may have been an element of luck about the equaliser, but Roberto Mancini's men upped their performance in the second half and deserved their win on a testing night.
Mario Balotelli, back from his ban, walked away in silence from the own goal his bold challenge had instigated, taking his no-celebration policy to a new level having snuffed out.
But it inspired the Blues to a victory over the Portuguese that had looked doubtful earlier. City's away record in Europe is tepid at best, and they took a while to get into their stride against a team whose success has been forged on a formidable home record.
Porto may no longer be the force they were under Jose Mourinho's stewardship, but even without the Special One at the helm their football is often raised above the ordinary, so this was a victory to savour.
Rolando's header from a corner, in turn headed clear by Gael Clichy, was an early warning of the Portuguese threat and it took some time for the Blues to make some inroads.
When they did, Yaya Toure - thrust straight into the fray on his return from Africa Cup of Nations duty - was unceremoniously halted by Danilo, who damaged his knee with the challenge and was being carried off as he saw the yellow card.
Micah Richards thundered in a shot that was well saved before Samir Nasri's drive was turned aside, and City were getting the upper hand when they fell behind in the 27th minute.
Silvestre Valera beat Clichy to the ball at the near post and Hart was given no chance as he connected solidly to put the Portuguese in front. It had to go down as awful defending.
Balotelli might have equalised but, fed nicely by Nasri, snatched at his shot, firing straight at goalkeeper Helton when he probably had time for a touch and a more measured effort.
Then when Clichy delivered a more than decent cross, Balotelli could not stretch far enough to make contact, to the striker's frustration on his 50th appearance for the Blues.
Finally, as the second half began to unfold, came a glimpse of that swashbuckling style that swept aside all comers earlier in the season, a swift, incisive passing move that ended with Richards firing against the foot of a post.
When the equaliser did arrive soon after, in the 55th minute, it was far more prosaic, Pereira knocking the ball into his own goal under pressure from Balotelli \fter Toure hoisted the ball in their direction. Hardly a classic, but gratefully accepted.
It left City's main tacklers walking a tightrope for the remaining half an hour but the tie itself was now finely balanced to the chagrin of the bulk of the 47,000 crowd.
And when Aguero applied the finishing touch after 86 minutes for his 19th goal of the season, following Toure's smart one-two with Nasri, Portuguese fears were realised. City's second European campaign of the season is well under way.