The Gods is the term referring to the "collective human unconsciousness," C's World, which is the source of the individual identities for all humans, living and dead throughout the Code Geass Universe. Due to their human nature of not being equal, they are constantly in conflict with each other. Because of this, Charles zi Britannia, Marianne vi Britannia, C.C. and V.V. formed a contract with each other to activate the Ragnarök Connection via the Sword of Akasha to destroy the Gods.
Originally, references to the Gods were considered some sort of metaphor by people such as Cornelia, but that has become less likely as the series progressed. It is later revealed that they are a collective subconsciousness of all humans beings metempsychosed into the World of C, which is visually similar to Jupiter.
Charles intended to use the Sword of Akasha to trigger Ragnarök, that would destroy the gods and once destroyed, every human that has ever existed, living or dead, will be united and exist as one mind. Lelouch, realizing that such a world would be stagnant and without a future, rejects this plan in favor of accepting reality. He then uses his fully-evolved Geass to command the Gods to deactivate and destroy Ragnarök, therefore causing the Gods to turn against his parents and dissolve them into nothing.