City had previously been unbeaten for 20 home matches in all competitions since a 3-2 defeat against Spurs in February, winning their last 16 at the Etihad.
But Toney, fresh from his England disappointment, scored his 21st and 22nd Premier League goals to end City's streak in dramatic fashion.
His winner came after 97 minutes and 16 seconds, the latest winning goal scored against City in the Premier League since exact goal times started being recorded in the 2006-07 campaign.
The Bees were made to do a lot of defending to earn the three points, with City's 29 shots their most in a Premier League home game they failed to win since a 2-1 defeat to Leeds United in April 2021.
Phil Foden's equaliser in first-half injury time was his sixth home goal in all competitions, his joint-best return in a Premier League season. Six of his eight goals (75 per cent) this season have come at the Etihad, compared to 43 per cent last term (six of 14).