"Shelob" probably wasn't her name
Fun fact, Sam's name is actually Banazîr and his father Ham is Ranugad. Tolkien's stories are meant to be translations of old books into English. He did, however, take certain liberties as to how to translate names.
"Shelob" is a simple compound word containing she, for "female", and lob, an archaic word for "spider", deriving from Old English loppe:
sense of "spider, silkworm" from Proto-Germanic *lubbō, *lubbǭ (“that which hangs or dangles”), from Proto-Indo-European *lep- (“to peel, skin”).
(yuck, so lob and leper seem to have a common origin)
Going from "female spider", we can translate this back into the original Quenya1 (of which there are many forms, but let's take the good old Parmaquesta, the high-elvish form) and you'd get something like Ungoliel. It's rather close to Ungoliantë, but liantë means "shadowy, dark"2, whereas the -iel suffix means female (Tinúviel, etc.)
From there, knowing the original Quenyan, we can come up with the proper English name of She-Spider or the more baroque Fem-Spider.
My assumption therefore is that the original work, passed down through the ages, did not name the spider, but used the name Ungoliel instead. Tolkien did not want to use the uncouth She-Spider and decided to be creative and use Shelob.
As for her real name, it seems to have, unfortunately, been lost. She might never have had one.
1The Lord of the Rings is derived from the Red Book, texts compiled by, among others, Bilbo and Frodo. Strictly speaking, it was written in Westron, the "common speech", but there isn't much information about that language, so I chose Quenya instead.
2The etymology of Ungol and liantë are unclear and have been switched a few times. Ungol was initially "dark", but that obviously wasn't the case in the Lord of the Rings. That would be an awesome new question though.