Tolkien was inspired by Scandinavian mythology, which had elves, trolls, dwarves, etc. Elves were essentially ageless pseudo-deities. I do think he was the first to give them their trademark leaf-shaped ears, though could be wrong.
Goblins have been around awhile, but were popularized by The...