There is a deep connection between yoga and Ayurveda. Yoga is mentioned in Ayurvedic texts as Charaka Samhita. Both yoga and Ayurveda have common origin and goal and emanate from the Vedic tradition of India and provide means to gain better health.
A verse from the Yoga Sutra, yogas chitta vritti nirodhaha, describes yoga as the settled state of the mind. Compared to a verse from Ayurvedic texts, svasmin dishati iti svasthah, which states that one who always remains united with the Self is a healthy person. These verses go to prove that both yoga and ayurveda have the same goal, which is attaining union with the Self, the most settled state of the mind.
Yoga is nothing but the unity of mind, body & consciousness while Ayurveda is a complementary practice to it. For example, Abhyanga or the Ayurvedic massage helps remove toxins from the body and relaxes the muscles for yoga practice.
Knowledge of Ayurveda provides tremendous support to yoga practice. The end goal of both yoga and Ayurveda is to clean the channels and the nadis & to detox and make a good dietary lifestyle and subsequently eliminate any rogas.