This originates from the Japanese folklore 児雷也豪傑物語, The Tale of the Gallant Jiraiya
In the legend, Jiraiya is a ninja who uses shapeshifting magic to morph into a gigantic toad. As the heir of a powerful clan in Kyūshū of the same name, Jiraiya fell in love with Tsunade (綱手), a beautiful young maiden who has mastered slug magic. His arch-enemy was his one-time follower Yashagorō (夜叉五郎), later known as Orochimaru (大蛇丸), a master of serpent magic (the kanji 大蛇 literally means "giant snake" or "serpent"). It was first recorded in 1806 - classic tale
Series such as Naruto, and Tales of Phantasia draw inspiration of this story in their elements, and also naming. All though in the Tales series it is more of a hidden reference. In Naruto almost the whole story is played out through the legendary three.
In Naruto, a popular manga and anime television series, Jiraiya appears in the series as a ninja with the ability to summon giant toads. Along with the series' versions of Tsunade and Orochimaru, he is part of a trio of legendary ninja known as the Densetsu no Sannin ("Legendary Three Ninja"). One of the anime's episodes is titled "The Tale of Jiraiya the Gallant."
Jiraiya is also a known element in the series