We can make the a priori assumption that the Vedic devas (gods) predate the Vedas. Since the Rigveda is dated between twelfth and ninth centuries B.C., the conception of devas must have originated a few centuries before the twelfth century B.C.—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 a few 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), and two are the divine twins, the Ashvins. The Yujurveda and Atharvaveda too 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.”
In the Rigveda, there is no trace of subordination of one deva by another—the lack of hierarchy among the devas is clearly exemplified in the assertions made by Indira and Varuna that they are obeyed by all the devas, even though there are hymns in which it’s 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 basis of the number 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.