Bali was a great Asura king who had conquered the heavens. At Indra's behest, Vishnu was born as a brahmin boy in the womb of Aditi, and went to the place where Bali was performing a great sacrifice.
This is the Vamana Avatar of Lord Vishnu.
The different mythological stories of olden age communicates that there had been always rivalry and hatred between the Gods and Asuras. As a result there had been constant war between them which in turn led to constant fear of death and suffering. The subjects of the country were never happy. A great battle happened between the Gods and the Asuras during the time of Tretayuga where the Gods won a victory. After the death of Hiranyakasipu, the King of Asuras, Prahlada his son became the king of the earthly Kingdom. Prahalada had a son Virochana who was married to Devamba and she gave birth to a son named Bali. Bali spent most of his time with his grandfather learning all the virtues and made him proficient in the Vedas and the art of warfare. Soon he became the best among all the Asura warriors and was very strong. Bali was also made the crown prince and was married to a saint's daughter named Vindhyavali. But Bali always had a worry in him, which made him think that, "Gods have created a feeling of fright among the Asuras by always hating them and fighting them. So I should break this theory and earn merit and adept in all respects, equal to that of the Gods. To attain this I shall perform tapas and win the blessings of Brahma." So he prepared for this and went to the forest to perform austerity. He was very strong in his tapa for he gave up food and drink; nor was he scared by the wind and rain. Finally Lord Brahma was pleased by Bali's tapas and appeared before him to grant his wish. Bali pleaded and requested his wish of not any personal benefit for him but for the sake of all the asuras for they have been rendered weak because of their fear of Gods. He asked for the boon of immortality and strength of Indra. Thus granted his wish, after which Bali happily returned back to the capital.
The return of Bali to the capital after the successful tapa brought joy to all the people and they were in great joy for that day was to celebrate the coronation ceremony. Every house of the town was white washed and painted with colours and pictures. There was a riot of green leaves in strings decorating the thresholds. There was music everywhere with the sounds of drums and timbrels. The people were very happy about Bali becoming their King and lord. Prahalada wanted Bali to become the King after his tapas which had given him great power. But Bali always wanted his grandfather to be the King, after a long discussion Bali, however, agreed to this only on condition that his grandfather should stay in the capital. The day of coronation was filled with joy and Kings from all over the country came to wish Bali. The Gods were however not really very happy about the happenings especially Indra, the King of the Devas for fear and anxiety took hold of him when he heard of the growing strength of the Asuras who drew their strength and courage from Bali. Not only the asuras but also scholars and heroes who used to be scared of devas now rallied together under the leadership of Bali. Bali appointed scholars and wise men as officers to assist him in the administration. Bali also appointed Shukracharya as his adviser who was one of the most celebrated and experienced ascetic.
Once he became the King, Bali set out on his adventure of world conquests with his ministers and generals as the head of his army. He wanted to be different from other Asura Kings for most of them were selfish and wicked for their own people were subjected to aggressive pressure or intimidation without any cause. The people were weak and helpless under the rule of the wicked kings and also their lands became unprotective and barren. So Bali decided that it is his duty to keep the people in peace and happiness for which the ruler should be good by becoming obedient and following his laws. If a King always displays his power to punish them, his own subjects oppose him and will dread him, like men who are frightened at the sight of a serpent. So saying Bali set out on his conquests and he also succeeded by capturing the whole world and finally he became the emperor.
After his conquest of the whole world, Bali called on a meeting which included all his Ministers and subjects. The gathering started and Bali commenced the meeting by prostrating before his chief preceptor Shukracharya and thanking him for his guidance and help. Shukracharya addressed Bali for his success and said that all the wealth Bali got belongs to the subjects and it should be equally distributed among them. For this purpose Shukracharya asked Bali to perform the 'Vishwajit' sacrifice. Then Shukracharya asked for two gifts from Bali where the foremost was to establish righteousness among the Danavas and the next wish was to practise the virtue of charity and keep the world free from poverty.Bali readily agreed to the wishes and to keep up his promise for ever. Bali wanted to implement the laws immediately. So he called a group of advisers to frame the laws and to see to that all people get enough food and shelter and all the necessities to ensure happiness of his subjects. Everyone was able to devote themselves to the performance of religious rites without fear. Peace prevailed everywhere. Bali did not stop with this, he instead travelled to all parts of the empire to ensure the happiness and welfare of his subjects. He was delighted to see green crops everywhere.
Indra the lord of heaven was not really very happy about Bali's fame on earth, and the fire of jealousy was kindled in his heart. So Indra called upon the Devas and told them about Bali's increase in strength day by day which will endanger the supremacy of the Gods in the heaven. To stir up violence and unlawful behavior among the people Indra decided to send Kalipurusha so that there was no rain and no crops which will lead to revolt against Bali. Accordingly Kalipurusha was sent to the earth to create disorder and turmoil. Meanwhile Bali and his subjects were thinking of defeating the Devas and annexing their kingdom of heaven to their empire which included all the earthly kingdoms. They also thought that Indra cannot hope to match Bali's valour and strength. We must defeat the Devas and annex their kingdom of heaven to our empire. It was decided that this is the time to get the full benefit of the boons Bali have secured from Brahma. So the right moment was fixed and confirmed by Shukracharya and the Danava army got ready to invade heaven. On the other hand Indra met his foes boldly riding his white elephant Airavata, but they began to flee from the battlefield one by one unable to face Bali. Finally Indra and the other Devas left heaven. After establishing victory over heaven, the Danavas installed Bali on the heavenly throne as Daityendra and celebrated the occasion as coronation. But however Shukracharya was skeptical for Indra is not a person who will lie low and he is sure to take revenge on them. So he advised Bali to perform one hundred 'Ashwasmedhas' (horse sacrifice) to retain his overlordship. Bali got ready for the sacrifice along with his queen.
Deprived of the heavenly Kingdom, Indra with distress and pain came to meet his mother Aditi and father Kashyaya of the devas. They came to their hermitage which was situated at the bottom of the Meru mountain. They all decided to go and meet Brahma to find a solution for their situation. Brahma consoled them by asking them to worship Vishnu and please him by their tapas so that Vishnu is born as their son. It was only that Lord Vishnu can vanquish Bali and bless them. Accordingly Kashyaya and Aditi performed the tapas to please Vishnu. Pleased by their tapas and austerity, Lord Narayana appeared before them and asked them for their wish. They explained the fact of the Danavas having occupied the kingdom of Indra with the help of Bali. So the devas have lost their power and kingdom. They cited to Narayana that the Danavas have transgressed the Lords law and have been behaving with pride and they were rude and impertinent. They requested Lord Narayana should be born as their son and defeat Bali. But Narayana was quite clear to them that it was not an easy joke to defeat Bali for he is been blessed by Brahma, the creator. Narayana suggested to them that some indirect method or a trick can only work with Bali. Only after this Kashyaya and Aditi were happy and both felt comforted. The devas now satisfied and left with peace and went looking forward for the good thing to happen.