Greatest who were directly involved in lord of the rings.
1) Tom Bombadil and / or Goldberry. Tom is the master. Much mystery surrounds them, they could even be the great Valar Aule and Yavanna, they could be Maia, or even the personification of Arda or of the great Music. Their true strength is unknown, but It is hard not to give them a high ranking.
2) Sauron. Even without the ruling Ring he was extremely dangerous and powerful. He holds the nine rings and several of the three.
3) Galadriel... a elf maiden... Controversial placement. But the greatest of the high elves still remaining in middle earth. She has been building her power and contesting her will against Sauron - and keeping her mind shut to his. She was also able to capture the light of a Silmaril and trapped it in Frodo's star glass. "Three times Lorien had been assailed from Dol Guldur, but beside the valour of the elven people of that land, the power that dwelt there was too great for any to overcome , unless Sauron had come there himself".
4) Gandalf the white... Potentially more powerful then Galadriel, but his powers are still being limited under the guise of the Istari. He is there to advise, and bring hope not to openly confront the enemy.
5) Saurman the white... overcome and imprisoned Gandalf the Grey .Forged a copy of a ring of power.
6) Glorfindel... A powerful high elven lord, fought and killed a Balrog in the first age. In the appendices it is told how he lead the Elvish forces of Rivendell, the Havens and Lothlorien against the forces of the witch king in the battle of Fornost. The Witch-king fled before him. He was the most powerful of the few eleven lords left in Imladris , he is sent by Elrond in the direction that the Nazgûl are most likely to come, and even holds the Bridge of Mitheithel against several single-handedly.
7) Gandalf the Grey.. More of his powers were being with-held, but still able to defeat the Balrog of Moria. He also had one of the three elven rings.
8) Balrog of Moria. Fiery servant of Morgoth. A maiar which was corrupted to the will of morgoth during the singing of the great music.
9) Shelob. Hard to decide where to place her. Below the Balrog or above Sauron... Last of the brood of Ungoliant. Her brood are the great spiders of Mirkwood. She resides in Mordor but remains indepedent of Sauron and his infleunce. She was not afraid of the light of Eärendil because she has seen it before. She has probably tasted high elf. Due to her relative unimportance to the story, and the fact she got defeated by a enraged hobbit she only made number 9 on the list.
10) Elrond the half elven. A wise and powerful elven lord who kept the elven ring Vilya. He was decedent from Elves, Man and Maiar. The reason behind the low ranking is that his power is in wisdom and council more then open confrontation. One of the mighty rulers of old that remained in Middle Earth.
11) Radagast the brown. Maybe a bit of a pacifist and a coward. But still a Maia if one confined in the body of a old man like the other Istari.
12) Cirdan the shipwright. One of the oldest named elves in Middle-Earth and lord of the havens. He was able to see through the disguise of Annatar (Sauron) and refused him entry to the havens. While advising the elves at Eregion not to forge the rings of power. He recognized Gandalf to be the most wise and powerful of the Istari and gave him the elven ring Narya ""Take now this Ring," he said; "for thy labours and thy cares will be heavy, but in all it will support thee and defend thee from weariness. For this is the Ring of Fire, and herewith, maybe, thou shalt rekindle hearts to the valour of old in a world that grows chill"
13) Thundail, King of Rohan. For one brief moment, he was god-like. " Fey he seemed, or the battle-fury of his fathers ran like new fire in his veins, and he was borne up on Snowmane like a god of old, even as Oromë the Great in the battle of the Valar when the world was young.". He was killed by no forces of Sauron, but by his own Steed, Snowmane a Mearas, decedent of Nahar, horse of the vala Oromë.
Other mentions: High elves in Rivendell and the Havens. Uncertain where they would place. The watcher in the lake outside Moria. The Witch-King (and other nazguls), the other human hero's (Aragorn, Eomer, Faramir, Boromoir, Denethor and prince imrahill), Legolas, Thranduil, Celeborn, Sons of Elrond and other elves of note. Gimli, Dáin II Ironfoot to represent the mighty among the dwarves. For raw physical power the Oliphaunts deserve a mention. Treebeard the leader of the Ents. Last but probably not less Gwaihir the Windlord, greatest of the eagles at the time of Lord of the Rings.