The Book of Gates is an Ancient Egyptian funerary text dating from the New Kingdom. It narrates the passage of a newly deceased soul into the next world, corresponding to the journey of the sun though the underworld during the hours of the night. The soul is required to pass though a series of 'gates' at different stages in the journey. Each gate is associated with a different goddess, and requires that the deceased recognise the particular character of that deity. The text implies that some people will pass through unharmed, but that others will suffer torment in a lake of fire.
The most famous part of the Book of Gates today refers to the different races of humanity known to the Egyptians, dividing them up into four categories that are now conventionally labelled "Egyptians", "Asiatics", "Libyans", and "Nubians". These are depicted in procession entering the next world.
The text and images associated with the Book of Gates appear in many tombs of the New Kingdom, including all the pharaonic tombs between Horemheb and Ramesses VII. They also appear in the tomb of Sennedjem, a worker in the village of Deir el-Medina, the ancient village of artists and craftsmen who built pharonic tombs in the New Kingdom.
The goddesses listed in the Book of Gates each have different titles, and wear different coloured clothes, but are identical in all other respects, wearing a five pointed star above their heads. Most of the goddesses are specific to the Book of Gates, and do not appear elsewhere in Egyptian mythology, and so it has been suggested that the Book of Gates originated merely as a system for determining the time at night, with the goddess at each gate being a representation of the main star appearing during the hour.