Their loyalty is Manwe, king of the Valar. From the Silmarillion:
"For Manwe to whom all birds are dear, and to whom they bring news upon Taniquetil from Middle-Earth, had sent forth the race of Eagles, commanding them to dwell in the craigs of the North, and to keep watch upon Morgoth;..."
A command specific to the First Age, but shows his authority over them.
Gandalf did save the life of one of them (Gwaihir*) and they give him some help in return. But they mostly stay out of the matters of other races.
*It is strange I can't find anything about this now. I could have sworn there was something somewhere that confirmed Gwaihir was the 'Lord of the Eagles' Gandalf helped. I'm not seeing it in the Hobbit/Lord of the Rings itself, though in Robert Fosters "The Complete Guide to Middle-Earth" (second? edition), the Gwaihir entry includes:
"Lord of the Eagles of the Misty Mountains. Gwaihir befriended Gandalf when the wizard healed him of a poisoned wound".
I did check all the page references and did not find confirmation. Maybe an assumption being made there too between Gwaihir's 'Windlord' name, and friendship with Gandalf.