The a priori assumption can be made that the Vedic devas (gods) predate the Vedas. Since the Rigveda is dated between twelfth and ninth centuries BC, the conception of devas must have originated a few centuries before the twelfth century BC—if the first Vedic sages didn’t have a priori knowledge of the devas, they could not have created the hymns on the divine attributes and actions of the devas.
The word “devas” relates to beings who are connected to swargloka (heaven). They exist to counter the influence of the demons for whom the Vedas use words like “Dasyus” and “Raksases”. In some instances, the word used is “adeva,” or the opposite of deva. In the Rigveda, Vrtra, the demon who had stolen the waters of the world, and was ultimately killed by Indra, the deva who is the lord of the heaven, is called adeva. In the Brahmanas, Puranas, and Ithihasas, the term “asura” is used for the demons. The Vedic mythology often makes it difficult to draw a line between the devas and demons because there are several entities which possess divine as well as demonic attributes.
The Rigveda notes that the devas are thirty-three in number—they are called the Trayastrinshata (Three plus thirty). The Brahmanas give a breakdown of the thirty-three devas—eight are Vasus (material gods); twelve are Adityas (personified gods); eleven are Rudras (consisting of abstract entities, atman, and the incarnations of Shiva); two are the divine twins, the Ashvins. The Yujurveda and Atharvaveda have hymns which talk about the thirty-three devas.
Here are three verses from the Rigveda in which it's suggested that there are thirty-three devas (translations by Ralph T. H. Griffith, 1896):
Mandala 1, hymn 45, verse 2
“Agni, the Gods who understand give ear unto the worshipper:
Lord of Red Steeds, who lovest song, bring thou those Three-and-Thirty Gods.”
Mandala 8, hymn 28, verse 1:
“The Thirty Gods and Three besides, whose seat hath been the sacred grass,
From time of old have found and gained.”
Mandala 1, hymn 139, verse 11:
“O ye eleven gods whose home is heaven, O ye eleven who make earth your dwelling,
Ye who with might, eleven, live in waters, accept this sacrifice, O gods, with pleasure.”
One deva is not subordinate to another—the lack of hierarchy is established in the assertions made by Indira and Varuna that they are obeyed by all the devas. However, there are hymns in which it is indicated that Varuna and Surya are subject to Indra, while Indra and the Asvins are subject to Vishnu, and even a relatively unimportant entity like Savitur is able to claim that his munificence cannot be resisted by Indira, Mitra, Varuna, Aryaman, and Rudra. Since the Rigveda sees all the devas as a manifestation of the omnipotent and omnipresent Paramatman, or the great soul and living principle, that is the undivided, timeless, and motionless author of the universe, there is no question of one deva being subordinate to another deva—all are equal, all are parts of the same Paramatman.
If the devas of the Rigveda are classified on the basis of hymns dedicated to them, then we might conclude that Indra, who has two hundred and fifty hymns, or a quarter of the collection in the text, dedicated to him, is the most important. After Indra comes Agni who has two hundred dedicated hymns, Soma has one hundred twenty-three, the Asvins have fifty-six, and Varuna has forty-six. The supreme deva Vishnu has five dedicated hymns, while the powerful Rudra has three, and the devi (female god) of learning Saraswati has three.