In the Veda, there is no mention of bhagavan. The idea of God is explored in various ways, but there is no definitive idea like bhagavan, which we find in the Puranas. The Vedas are 4000 years old and the Puranas 2000 years old. The Vedas were more obsessed with rituals but by Puranic times great value is placed on the idea of devotion to an almighty being often identified as bhagavan.
But the word bhagavan is used as a title in Buddhism and Jainism. Both these are monastic orders which do not bother with the idea of God. They are more interested in breaking free from the bondage of worldly life. Those who are able to do so are called bhagavan. Thus Jains speak of Bhagavan Mahavir and Buddhists speak of Bhagavan Buddha. A bhagavan in these monastic orders possess kaivalya, universal knowledge, and so is not entrapped by fears and desires that plague the common man. Bhagavan is used in the sense of the wisest of the wise.
In Hinduism, bhagavan refers more often than not to Vishnu, who is God who engages with the world in the form of Ram or Krishna without seeking anything from it. A good way to understand what bhagavan means in Hinduism is to understand the Vedic ritual known as yagna.
Yagna is based on the understanding that all living creatures crave for hunger. Yagna facilitates exchange between such hungry creatures. The yajaman, who initiates the yagna, invokes and feeds the devas, obliging the devas to feed him.
With the rise of monastic orders 2500 years ago, people wondered if it is possible to outgrow hunger itself. Buddha identified hunger as desire. The Jinas of Jainism saw hunger as bondage which prevents living creatures from attaining higher realms. Hindus imagined a being who has overcome hunger, one who is greater than devas. This was Maha-deva, or ishwar, or Shiva. But since Shiva never had hunger, he had no reason to participate in the yagna. God who participated in yagna needed to have empathy for the hungry. That was Vishnu. Thus ishwar (Shiva) and bhagavan (Vishnu) embody two aspects of divinity.
The word bhagavan is traced to the word bhaga, which means share. Every human being seeks a share of the world’s delight. We often feel we get the lesser share and others get the better share. When we have to divide our wealth, we don’t know what is the appropriate share that other people deserve. Only God knows how much share everyone must get based on karma. He is able to decide the right ‘bhaga’, hence bhagavan.
Bhaga also means womb, or material delight, or even fate. In other words bhaga refers to the material world which is the womb of all material delight, of fortune and fate. Bhagavan is God who engages with this material world, with fate, with the sensual pleasures it offers. He does not withdraw. He is no monk, like Shiva or Buddha or Mahavir.
The earliest epigraphic mention of the bhagavatas, those who worshipped bhagavan, comes from an inscription in Brahmi found on a Garuda pillar dedicated to Vasudeva (Vishnu-Krishna) in Vidisha, Madhya Pradesh, dated 100 BC. He was an Indo-Greek ambassador from Taxila sent from the court of the Yavana king Antialcidas to the court of Bhagabhadra. His name was Heliodorus.