History
The exact time of the origin of Ayurveda is not clearly known. But one myth (Purana) from the Indian creation mythology gives some information about the origin of Ayurveda. Another origin are the Vedas:
1. Purana - the myth about Ayurveda:

One of the creation myths is Ksheera sagara medan (ksheera means milk, sagar means ocean and madan means churning). In this story the gods and demons churned for “elixir” (nectar of immortibility) and from this churning of the ocean of milk so many things emerged:
Kamdhenu [a holly cow],
Kalpavruksha [sacred tree],
Goddess Lakshmi [goddess of prosperity],
The Moon,
Poison (Halahala) and
A god called “Dhanvantri” with the nectar in his hand.
2. Ayurveda and the Vedas:

Ayurveda and Veda have a relation in depth.
Vedas are ancient doctrines of great knowledge on earth. The major Vedas are four in number and they are Rigveda, Yajurveda, Sama veda and Atharvana veda. Each main veda has one upa veda [sub veda].
Ayurveda is treated as Upaveda of Rigveda and Antharveda (internal part) of Atharvana veda.
Ayurveda is not a merely medical system or a medical kit; it is like sacred science of life.
It helps the human being to lead a happy life with pure mind by providing the whole information about it. So it is treated as Panchamaveda (5th major veda).
In Ayurveda there are some “paramparas” [Knowledge from Gods] called Daiva parampara, Siddha parampara and Rishi parampara:
1. According to Daiva parampara, the flow of the knowledge is like this: it was revealed by Lord Brahma. The knowledge of Ayurveda transformed from Brahma to Ashwini kumar [divine healers] through Prajapati [Son of Brahma]. Ashwini Kumar taught Ayurveda to Indra. From Indra, Ayurveda was revealed to a Saint called Bhardwaj.
2. According to Rishi parampara: Dhanvantri - Susruuta, Vaitarana, Bambrha, Poshka bhavara, Gopura rakshita and Karaveera - Kasyapa - Atri, Bhrugu and Vasishta.
3. Ayurveda and the Vedas:

Lord Siva - Parvati - Nandi - Agastya - Chulastya - Tairayar.
So the origin of Ayurveda is not clearly known. But according to information from ancient texts, we can say that, Ayurveda is an ancient and higher knowledge which supports human being to lead a happy life in natural way.