Old gods = Elven gods = Ancient elven dreamers Created the golden city as a resting place for the oldest elves to dream in Uhtenera.
When Fen'HArel/Solas locked the elven gods away, he placed them in different locations around thedas deep underground.
With the fall of Arlathan, and the loss of elven immortality caused by a tevinter entering the crossroads, there for altering elven magic, the golden city turns black to symbolise death and betrayal.
Fast forward to the magisters entering the fade, a ritual taught to them by the slumbering dreamers in the fade, believed to be 'old gods, they were led to the black city by the dreamers in hopes of being awoken, and freed of their prison. Fen'Harel had planned for this occassion, and cursed the city to bansh anyone capable of entering back into the real world tainted by their deeds.
Upon reentering the real world, the taint takes hold, twisting them into the first darkspawn, driven by a calling to free the dreamers in the real world where they had failed in the fade.