Here's my theory, which is an edited cross post: The Black City is a living thing which used to be Golden but turned Black after Solas/Fen'Harel locked the Old Gods out of it.
Solas and Mythal were/are trying to revive the Golden City and thus the Old/Elven Gods. When the post credit scene first opens, Flemeth is seen pushing a soul (likely Keiran's/Urthemiel's) through the Eluvian. Now, whatever happens to FleMythal, what happens to Flemeth's body once the soul leaves it? It turns completely black. Black, like a certain city a certain blighted Magister found "empty." So the city was Black and empty before the Magisters entered it. But what about the Blight? Consider Dorian's explanation of how the Tevinter choose to remember how the Blights started. Essentially they disavow responsibility. What if this is more or less correct? They did become tainted, but their actions did not in and of themselves create that taint. If the city was a living thing in and of itself, and Fen'Harel, in his rage locked away the things which kept it "alive" and healthy, then like Flemeth, it would turn black. However, much like lyrium, it would still have power and still have the power to effect other beings. What if the City, like red lyrium, basically became infectious? So when the Magisters enter the Black City, they become infected with a warped version of what used to be a "natural" biological response for the elves. The Blight and Darkspawn which came from that, resulted in a cycle Fen'Harel had not anticipated - the old gods were now not merely locked away any more, they were being sought out by the Blighted Magisters and Darkspawn, corrupted and, shockingly, eventually destroyed.
Lyrium, being a living thing, is actually a result of some kind of proximity to an old god soul. It of course grows out from the spot, but how else could living magically potent rock come to exist if not a close proximity to beings for whom magic was a natural as breathing...indeed magic was a biologic function).
This explains not only Solas's sadness when talking to the Inquisitor at the end, as he more than any others realises that the return of the old gods is far from ideal, but he sees the world, and Flemeth, decaying and degrading. So Flemeth returns an old god's soul to the City, and becomes as much a part of Solas as his heart. Solas not only apologises to the Inquisitor - If you go through certain dialogue choices and express the belief that even with great power so long as one continually tries to do better, learn from their mistakes, and keep going, everything can be made right and good - Solas expresses warm admiration and agreement. Solas has been trying to find a way to help his friends (the old/elven gods) and his people (at this point basically all people not just the Elves {who he certainly does not see as "like him"}), and has been failing despite having great knowledge and power. Things have not been going according to plan for Fen'Harel and Mythal, but that doesn't mean they won't keep trying.
TL;DR - Solas/Fen'Harel, thinking the Old Gods/Elven Gods had gone too far (believing Mythal dead), tricked and imprisoned them by, in part, separating the Fade and "Real" Worlds. The Golden City, like Flemeth after Mythal left her body, went Black. Lyrium grows out from imprisoned Old Gods in real world. Magisters enter Black City, are warped, corrupted, and Blighted by it. Many return to real world as Blighted Darkspawn and seek out Old Gods for a variety of possibilities.