Ungoliant is the great spider Shelob’s ancestor in J.R.R. Tolkien’s Middle-earth.
Ungoliant is a primordial, spider-like being who appears in the First Age stories collected in The Silmarillion. She allies with Melkor, later known as Morgoth, to destroy the Two Trees of Valinor. Ungoliant drains the light from the trees and helps Morgoth escape with the Silmarils.
Afterward, Ungoliant settles in the south of Middle-earth and produces offspring. Shelob is described as one of her descendants. This connects the giant spider encountered by Samwise Gamgee in the pass of Cirith Ungol to the much older mythology of the First Age.
Ungoliant and Shelob are not the same character. Ungoliant belongs to the earliest cosmic history of Arda, while Shelob lives near Mordor during the events of The Lord of the Rings. Ungoliant’s ultimate fate is left uncertain in Tolkien’s surviving narrative accounts.