The Goryō (御霊) are ghosts from Japanese mythology, whose name is broken down into 2 kanji: Go (御 meaning honorable), and Ryō (霊 referring to a ghost or spirit).
The Goryō are the vengeful ghosts of aristocrats, especially, those who were martyred in life.
They were very common in the Heian period. Popular belief says that they are capable of performing catastrophic revenge, from destroying corpses to summoning typhoons and earthquakes.
Tenjin is an example of Goryō. Tenjin is a Shinto god, who, in life, was the ruler of the Fujiwara clan, known as Sugawara no Michizane.
He was assassinated in a plot hatched by another member of the Fujiwara clan. Immediately after this event, the capital was hit by heavy rains and lightning storms.
Several influential people of the Fujiwara clan died as fire caused by lightning and floods caused by rain destroyed their residences. The surviving court attributed what happened to the angry spirit of Michizane.
The emperor, to placate the angry spirit, ordered that the place where he lived be restored and that the exile orders be burned. He was given the name Tenjin, meaning "God of the Heavens".
A shrine was built in Kitano, which was considered the most important "official" shrine.