The visitors had taken the lead just before the 15-minute mark via an excellent solo goal from Luis Dias, who picked up play on the left wing before cutting inside and finishing back across Ederson into the bottom-right corner.
But Pep Guardiola’s men were given an opportunity to respond almost immediately when Raheem Sterling was brought down in the box by Pepe after Gundogan’s close-range effort came back off the post.
And Aguero made no mistake from the resulting penalty, squeezing home his 40th Champions League goal, and first of the new season, under Marchesin.
READ: Guardiola provides Fernandinho injury update
We started the brighter in the second half, with Porto’s goalkeeper once again called into action within the opening four minutes when Gundogan’s placed volley back across goal from a right wing cross looked destined to find the bottom corner.
But the German wasn’t to be denied a second time, and stepped up when Pep Guardiola’s men were looking for a moment of inspiration to overcome a stubborn Porto side.
After being fouled on the edge of the box, the midfielder curled a delightful free-kick up and over the wall from 20 yards out to give us the lead in the 65th minute.
And just seven minutes later Torres put some daylight between the sides, cutting inside Pepe and finding the top corner after playing a neat one-two with fellow substitute Phil Foden.
WATCH: Guardiola praises ‘incredible’ Foden and Torres combination
With attention drawn towards an altercation between Sterling and Pepe, Rodrigo almost added a fourth with a spectacular long-range strike that Marchesin diverted onto the post in the 85th minute.
But it was job done for City, who kicked off a tenth consecutive Champions League campaign with a hard-earned three points.
Check out the best of the action via the gallery below…