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, everyone would exist as one person. Lelouch, realizing that such a world would be stagnant, denies their attempt to create a new world. He then uses his Geass to influence the Gods to deactivate and destroy Ragnarök, therefore causing the Gods to turn against his parents and absorb them.