This is maybe not the kind of answer you want, but maybe it can be helpful if you want to determine a strict rule-wise answer:
In my interpretation, there exist a kind of power balance in a setting keeping the status quo.
Take the idea in the 'Points of light' setting for 4E for instance, small pockets of civilization exist surrounded by pseudo-uncharted monster-infested wilderness.
If the points of light were unable to defend themselves against their immediate surroundings they would be swallowed up - thus it can be assumed that any village, town or city contains the means for defeating the dangers that commonly besiege them. This could be the village cleric or witch protecting against the ghost's in the swamp or the city guard and walls protecting against the orc raiders.
Now, the Sword Coast is a different setting, but the same must hold true. Baldur's Gate contains the defenses to defeat common threats easily, and more rare threats like a plundering army or a sneaky vampire sect if they get time to muster their forces and call on allies.
It does not however have the power to defend itself if the local power balance shifts suddenly without any warning. An ancient red dragon is a nation-state level power in the world - it appearing out of nowhere would probably devastate the city.
I don't know what sources say on the exact number and level of the populace but my point is - if you compare the power structure in the area - rivaling cities and common and rare threats then it should be possible to judge the power of the city as an entity.
Does Baldur's Gate commonly deal with powers on the scale of an Ancient Red Dragon? - No.
Are there rare known threats on that level? - Maybe, it would then be rivaling cities and known powerful entities that at times have interacted with the city - My guess would be that it would be outmatched but only barely.
Maybe the collective power of the city's wizards and soldiers would annoy it enough to back off after half the city is in burning ruins - and it will return soon three times as angry.
At that time either the city has recruited help, an opposing power or artifact have also appeared/been discovered, or it is doomed.