Question: is treebeard older than gandalf?
Answer: The order oldest to youngest goes Treebeard, Sauron, Shelob, Gandalf. The ents were created shortly after the dwarves, which were created before the elves. If we're saying Middle Earth, then Gandalf came after Shelob.