Bali Chakravarti was a very worthy King. His Grandfather Prahlad Maharaj had instilled in him a strong sense of devotion and righteousness and so he ruled his Kingdom justly. His Kingdom comprised the three worlds and when His Guru Shukracharya encourages him to do Ashwamedha Yagna, he readily agrees.
But that makes Indra insecure. Because anyone who does 100 Ashwamedha’s cam become the next Indra, the king of heavens. And so he runs to Visnu to save him.
Visnu listens to him and takes birth as the son of Aditi, the mother of all Devas. He is named Vaman. He is short but his face has such radiance that one cannot stop looking at him.
During one Yagna, this Brahmana boy Vaman, goes to Bali to beg for alms. His radiance is such that everyone just keeps on gazing at him. And Bali comes forward and asks what the boy wants. Vaman says, ‘three paces of land’. Bali agrees. While Shukracharya disagrees. He understands that Vaman is someone special and dissuades Bali from making any promises but Bali does not pay any heed tohim. After all how much can a midget cover with his three paces.
But then Vaman grows n size and becomes a giant and with the first two paces covers all the tree worlds and then asks where do I place my third step and Bali offers his head.
Bali folds his head and bows down in reverence offering himself. Vaman dev puts his feet on Bali’s head and pushes him to Patal or the nether world. For this act of Bali, he is taken to be the example of atma nivedanam or complete surrender. He is one of the Mahajanas and still resides along with he other Mahajanas like Hanuman etc.
While Vaman was taking his first two paces, his toes of the left foot pierced a hole in the outer covering of the earth. From this covering the waters of the causal ocean leaked through and fell on the head of Lord Siva and that is how Ganga took birth. Because she took birth from the foot of Visnu, she is also known as Visnupadi. First she inundates the heavenly planets then flows through Brahmapuri atop Mount Meru.
There is an interesting video in Youtube which shows how Ganga came into origin you can view it here
Sourced through Srimad Bhagvatam, Fifth Canto, Chapter 17
All images sourced from Krishna.com