Eru Ilúvatar
David Callaway, writing in "Mythlore", notes that Tolkien, a devout Roman Catholic, had made Middle-earth a place where good and evil are in conflict under an omnipotent god, Eru Ilúvatar: in other words, "his cosmology is Christian". Callaway describes Gollum as fitting into this framework as a being not wholly evil, able to make moral choices.