The shrine legend tells us that it was founded sometime between 71 and 130, possibly in 110, during the reign of the 12th Emperor, Keikō, by Yamato Takeru. While he was in what is now Ueno Park on his way to quell the Emishi, he came under the divine protection of the two ancestral kami of medicine, Ōnamuchi-kami and Sukunabi-kona-no-kami, and built the shrine in their honour.
There is a reference to a Gojō Tenjin in the area in a travelogue, "Hokkoku-Kikō" (北国紀行), written in 1486 by a Tendai Sect monk/poet, Gyōe (尭恵). Moving down the centuries, a temple, Kanei-ji, (寛永寺) was built in 1625 at the instigation of the 3rd Tokugawa Shōgun, Iemitsu, and Tenkai, and it may have been Tenkai and/or his disciple, Kōkai (晃海) who, concerned that a shrine called Gojō Tenjin had no apparent connection with
Sukunabi-kona-no-kami (101) 少彥名命
From Merged Shrines
Earliest mention of: 110 (?)
Annual Festival: May 25
Sugawara Michizane, oversaw its absorption in 1641, of a jinja in which Sugawara Michizane was enshrined. Along with this, the shrine also became popularly known as Shitaya Tenman-Gū (下谷天満宮). It was quite close to Kanei-ji and along with the latter's repeated expansion had to move on several occasions. In 1697 it was moved into the grounds of an estate belonging to a renga (連歌, Japanese linked poetry) master, Segawa Masatoshi (瀬川 昌耆). It stayed there until 1928 when it was moved to its present site, which is very close to its original location.
One of both the 25 and Seven Edo Tenjin. Essentially the sibling shrine of the Hanazono Inari Jinja, with which it shares both an address and a Tenkai/ Kōkai connection. Not as visually appealing as its sibling, it is the elder of the two and given their proximity, they essentially share the same grounds, it would be silly to visit one and not the other.