But Palace, who had defended resolutely for most of the game, refused to give up and Wilfried Zaha’s late drive into the box paid off when his cross was deflected and turned in off Fernandinho.
It was a game City controlled in large spells, hitting the bar through Kevin De Bruyne early on and later having a penalty awarded but overturned by VAR.
Yet again they were caught out from a set-piece as on-loan Everton forward Tosun marked his first Palace start with a goal.
Aguero, taking his record City goal tally past 250, looked to have turned things round with his late double but Palace, who won the corresponding fixture last season, again frustrated them.
The frantic closing stages aside, City were controlled and dominant in possession. They did not lay siege to the Palace goal but they patiently carved out a number of chances.
A swift break led to an opening for Aguero but his shot was blocked. De Bruyne then hit the woodwork with a brilliant free-kick and Aguero’s follow-up attempt was saved by Vicente Guaita.
Palace seemed more intent on taking time out of the game than attacking, with Guaita noticeably slow to take goalkicks.
It came as a surprise when Palace snatched the lead, against the run of play, six minutes before half-time but City, not for the first time this season, were exposed at a set-piece.
Things might have got worse for City almost immediately afterwards as Tosun caught Ederson outside his area but the Turk tripped Fernandinho in the muddle.
Sterling curled wide early in the second half but Tosun again almost caught City out when he controlled on the edge of the box and forced Ederson into a good save.
Pep Guardiola sent on Gabriel Jesus in an attempt to find a breakthrough for City and the Brazil striker was presented a chance almost straight away but blasted wide.
City thought they had been handed a lifeline 19 minutes from time when Scott awarded them a penalty for handball by Jairo Riedewald. That was quickly extinguished, however, as VAR ruled the handling was accidental after Joao Cancelo’s cross had initially struck his leg. City were not happy but the decision was understandable.
Aguero finally broke through when he slid in at the far post in the 82nd minute to turn in a Jesus cross for his 250th City goal. He then sparked jubilant celebrations when he guided in a header from a Benajmin Mendy cross moments later.
It was not the be the final word, however, as Zaha drove forward and forced the unlikely equaliser.