City found an equaliser just before half-time as Phil Foden connected with a deflected ball and sent it rocketing into the top right corner of the goal, but it was Toney who was the hero as he slotted home a close range shot in the 98th minute to give Brentford the victory.
There was a lengthy stoppage just after the break when Aymeric Laporte, who has been named in Spain's World Cup squad, received treatment after an inadvertent elbow from Ethan Pinnock opened a gash on his forehead.
City racked up 29 goalscoring opportunities but only managed six on target as Brentford's defence suffocated their attack and restricted striker Erling Haaland to a couple of half-chances.
That set the stage for Toney's winner as Brentford broke forward deep into second-half stoppage time, and the 26-year-old made no mistake as he fired home to secure a stunning victory.
"Obviously [being left out of the England squad was] a disappointment but I know I'm capable of and I won't let it put me down, I'll just keep going and keep doing well for Brentford," Toney said after the match.
"The motivation is the boys in the dressing room, and the fans as you can see. When we work hard, this is what we can do."
"The best team won, we struggled from the beginning and we couldn't deal with their long balls. Usually you press the ball to win it, but this was different. They defended so deep and so well," City manager Pep Guardiola said.
"We have done exceptional in the Champions League and well in the Premier League. We'll come back and prepare for the second half of the season now."
Information from Reuters contributed to this report.