After you defeat Gwyndolin, you get to a chamber. This was as far as I know some kind of a memorial room because Gwyn offered himself to the flames. In one of the chests you can find the miracle "Sunlight Blade". I will give you a quote from the description of it:
"When the eldest son was stripped of his
deific status, he left this on his father's
coffin, perhaps as a final farewell."
If you read that somewhat closely, you can see that his status as a god was removed AFTER Gwyn had offered himself to the flames. Now, what does that mean? Well, contrary to what most people seem to automaticly assume, it was not Gwyn who did it. So who could it be?
How about the person ignored and hated by everyone he knew? The man raised as a woman because of his attributes, and seemed to have been isolated from the other gods? How much hatred do you think had been growing inside Gwyndolin towards the other familymembers after what they did to him? And who do you think would be in controll after Gwyn offered himself? Surely not the lastborn. No, the god of war, the firstborn would.
In some other item description related to this (cannot remember which) it was stated that the firstborn was stripped of his powers because of his foolishness. If you think about it, this can be interpreted in different ways. One could be that he did something stupid, and the other is that someone tricked him, and clearly Gwyndolin would be able to do that considering his intelligence. He could have droven out the other gods too, and may be the reason why he is the only god left in Anor Londo.
I think it is pretty clear by now that I think Gwyndolin is the bad guy in this game, and not Gwyn. However, what about Gwyn? Why did he even offer himself to the fire? Of course, the Age of Fire was fading and all that, but he must have known the consequences, namely torment until someone else decided to offer himself. What if Gwyndolin persuaded him to do it. Gwyndolin could have had all this planned all along, and he simply wanted to get more power. I know this is purely speculation, but I think it is worth thinking about.
Now, back to the firstborn. Personally, I think it is Solaire. He doesn't seem like the sharpest knife in the drawer, so he seems like to could have fell for something like that. Also, he has the symbol of the firstborn several places, such as on his shield, and doesn't it sound weird that he is looking for his own sun? I am not sure how Gwyndolin did it as of yet, but I will think more about it. Anyways, listen to one of his last dialogues. At one point he says: Was it all a lie? Of course, we cannot know for sure at any time in this game, but atleast this is what I think at the moment.
There is also one last person that seems very connected to Gwyndolin, and that is Velka. She is, as you might know, the goddess of sins, and her job is to punish those who do it. However, isn't that Gwyndolin's job? I think she was the previous leader of the Blade of the Darkmoon covenant. However, she isn't anymore, so what happened? Did Velka get the same fate as the other gods, and was driven out of Anor Londo? Either that or she left the covenant because of all the terrible acts Gwyndolin did? The point is, in both of these theories, Gwyndolin sinned.
Velka seemed to have fled or was banished in the painted world, considering all her followers items are found there, and several crow-like creatures too, which are associated with Velka. The fact is that only people or gods who are feared come in there. Now, why would Gwyndolin fear Velka? Obviously because he sinned. So what is the punishment? I think Velka released the undead curse, and created the darksign. This is the reason why the undead asylum was built. To prevent the undead from reaching him. He also made sure that anyone who actually managed to get out would think Gwyn was the bad guy instead, so that the Age of Fire would be extended even more.
So basicly, I think the main character is on a mission by Velka to punish Gwyndolin, who is really the bad guy in this game, not Gwyn, contrary to popular belief.
Remember, most of all this is purely speculation, so please take it with a pinch of salt and tell me what you think of my theory.
Sorry for the wall of text btw.