Well, I had no idea about the riddle as a whole, but once
Urwen got us to the right general area:
'Greycloak' is used as a name for both Luthien's dad (Thingol, Sinda-Collo in the Quenya) and Gandalf (Greyhame). Gandalf was also imprisoned in a high place, like Luthien - and rescued by his buddies Radagast and Gwaihir.
It's a shame the structure of the riddle didn't let you mention that they both knew Gwaihir, come to think of it.
hS