The temple is said to have been founded by Gyoki, a priest in the Nara period who engaged in welfare activities such as building bridges, and who also contributed to the raising of the Great Buddha of Todai-ji Temple.
奈良時代に架橋、土木工事などの社会事業に携わり、東大寺大仏造立にも貢献した僧・行基が創建したと伝わる。