Gandalf says there are creatures older than Sauron in Middle Earth. If Sauron is an immortal Maiar, how is that possible?In The Lord of the Rings, Gandalf gives us an interesting quote regarding the mysteries of Middle Earth.
Far, far below the deepest delving of the Dwarves, the world is gnawed by nameless things. Even Sauron knows them not. They are older than he. Now I have walked there, but I will bring no report to darken the light of day – Gandalf
Is this Tolkien slipping up? We know from many readings, beginning with The Silmarillion, that Sauron was once a Maiar, a kind of angelic spirit that predates the creation of the world, but also of a specific class of spirit that entered the world not long after its creation . How is it then possible that anything in Middle Earth could be older than Sauron?
This is another one of those cases in which naming and identity are critical to understanding the themes of Middle Earth. The wisest of the wise know the world is a temporary place and that power and control are corrupting influences.
Sauron is one of the Middle Earth names (a Quenya name) of the being previously known as the Maiar Mairon, a Maiar associated with the Valar Aulë. We see a similar name change of the Valar Melkor to Morgoth. Likewise, all of the Maiar who later took the form of old men as the Istari, including Gandalf, had different Maiar names.
I take this to mean that nameless things existed in Middle Earth prior to Mairon being completely subsumed or replaced by his Middle Earth identity of Sauron. Roughly speaking, these nameless things began their existence in the world prior to the knowledge of his existence by the Elves in the First Age as a chief servant of the enemy Morgoth.
It is important to remember that corruption is relatively easy in Middle Earth, but virtue is not. Mairon becomes Sauron, and while gaining power in Middle Earth, he loses many of the divine gifts of the Maiar, such as the ability to assume a pleasing appearance.
Conversely, the Maiar known as Olorin to the Quenya speaking Elves, takes on the form of an old man known (among other names) as Gandalf the Grey. Gandalf is the only Istari known to stay true to his mission and later is transformed into the more powerful Gandalf the White.