Tolkien, who was a devout Catholic and who wanted his religion in LOTR to not contradict his own, literally had minor gods (the Valar). He squared that with his Catholicism because he had them subordinate to Ilúvatar (God), much like how saints and angels are.