As Greek Folklore Has It...
There are two legends associated with the cornucopia or Horn of Plenty as it is defined that dates back to 5th century B.C. Below are two shortened versions of the legends.
Amalthea and Zeus
According to ancient Greek mythology, Amalthea was a goat who nursed and raised Zeus from an infant, while in hiding from his father, Cronos, up in the mountains of Crete. She nursed him with her milk and ensured his safety in order for him to one day become a powerful god.
One day, while playing around, Zeus accidentally broke one of Amalthea's horns. In his remorse, he decided to repay her by using his godly powers to ensure the horn to be always filled with whatever Amalthea wished - eternal abundance. Hence the coining of the symbolic Horn of Plenty or cornucopia.
Amalthea's Horn and Hercules
This version of the myth tells of Hercules who is the son of the Greek god Zeus, who finds himself in a battle with Achelous, god of the river, to win the heart of Deianira, a beautiful maiden and the daughter of King Aeneus. According to legend, Achelous transformed himself into several creatures during the battle as part of his strategy to beat Hercules. As he was being held to the ground, he transformed himself first into a serpent, then a bull. Hercules, however, overtook him and eventually broke off one of his horns. Achelous then turned back into his god-like form, and returned to the river, therefore being defeated by Hercules.
The beautiful maiden Deianira and Hercules kept the horn of Achelous and filled it with fruits and flowers to be presented in celebration of their marriage.
There is a slightly different version that depicts how Hercules was Zeus's son and therefore owner of Amalthea's Horn of Plenty, and after battle with Achelous and feeling guilty for breaking off his horn, he gave him the Horn of Amalthea as a peace-offering.