Children's Day derives from "Tango no Sekku[端午の節句（たんごのせっく）]" which is a seasonal ceremony and one of five Sekku[五節句（ごせっく）]. Tango no Sekku is a day for praying for boys' health & growth. The day for girls is March 3, "Momo no Sekku[桃の節句（もものせっく）]".
In the past, dates and times were represented by Chinese astrological calendar. In this calendar, years, months, days or times are each divided into 12 and are represented by 12 animals. It is called Eto[干支（えと）]. Only Eto of years remains now but this is rarely used and is limited uses.
Tango[端午（たんご）] was originally First Uma[午（うま）](Horse) Day of a month by Eto. Chinese character "午" is read as "Go" or "Uma". And five is also "Go[五（ご）]" in Japanese. Therefore, it is said that the day of Tango shifted to May 5.
Tango no Sekku is a ceremony which has lasted since that was introduced from China into Japan in the Nara Period(710-794).
In the ancient China, people had customs of taking a bath with putting Shōbu[菖蒲（しょうぶ）](sweet-flag) leaves(This custom is called "Shōbu-yu[菖蒲湯（しょうぶゆ）]".) and of hanging a bundle of Shōbu and Yomogi[蓬（ヨモギ）](Japanese mugwort) leaves under the eaves on the day of Tango no Sekku.
It is said that those customs are for removing evil because of Shōbu & Yomogi leaves having strong odors and they have been used as medical herbs. Thus, Tango no Sekku is also called "Shōbu no Sekku[菖蒲の節句（しょうぶのせっく）]" because of using Shōbu.
These customs remain in Japan still now but the latter custom is seldom practiced in the modern time.
When the aristocratic society was replaced by the Samurai society, Tango no Sekku(a.k.a. Shōbu no Sekku) changed into the ceremony for boys. Shōbu is also the reading of an idiom "尚武" which means "respecting martial arts" and the leaf of Shōbu is like a sword. Therefore, that changed into the ceremony for praying the health of boy who was a precious successor of Samurai and this ceremony became important for their families.
Around this time, Gogatsu-ningyō[五月人形（ごがつにんぎょう）](an armed doll or helmet or armor for Tango no Sekku) came to be displayed on Tango no Sekku in many families with a boy. Armor is a symbol of security and it is for preventing children from disease and disaster. And Koi-nobori[鯉のぼり（こいのぼり）] is often displayed in the garden.
Gogatsu-ningyō at Ichinoe Nanushi Yashiki[一之江名主屋敷（いちのえなぬしやしき）] in Edogawa, Tokyo
Kabuto[兜（かぶと）](Samurai Helmet) of Origami[折り紙（おりがみ）] that I made from a leaflet
There is also a custom to eat Chimaki[粽（ちまき）](rice dumpling) and Kashiwa-mochi[柏餅（かしわもち）](rice cake wrapped in oak leaf) on Tango no Sekku.