Vedas are related to Gita in such a way that you can find all the teachings of Veda in Gita. Even the Supreme Himself has explained about this in Gita,
"And I am seated in the heart of all beings. I am the source of memory, knowledge, and forgetfulness. I alone am to be known by the Vedas. I am indeed the author of the Vedanta as well as the knower of the Vedas" (15:15)
You can find the teachings of Gita reflected in all the great scriptures of the world. The Bhagavad-gītā comprises chapters 25–42 of ‘Bhīṣma Parva’, the sixth section of the Mahābhārata. It appears as a part in the great epic Mahabaratha, yet it teaches us the lessons of life and also about moksha (liberation).
After revealing the true knowledge to Arjuna, the Supreme gives the choice to Arjuna and asks him to proceed further in line with his decisions. It (freedom of choice) shows you the right path but gives you the control to decide. It reinforces that you are the master of your fate and the captain of your soul.
"Thus, I have revealed to you the knowledge, the mystery of the mysteries. Reflect on it fully, and do as you wish." (18.63)
It's not easy to answer how Gita is related to vedas in one quora question. But if you want to truly taste the nectar of entire Gita, I would suggest you to get this wonderful vedic book online,
- The Transcendental Knowledge.
Published by Nightingale