Repost from the Official Website of B.K.S. Iyengar:
“It is said that Lord Vishnu was once seated on his couch, Lord Adisesa (the Lord of Serpents) watching the enchanting dance (tandava nrtya) of Lord Shiva. Lord Vishnu was so absorbed in the dance movements that His body began to vibrate to the rhythm of Lord Shiva. This vibration made him heavier and heavier causing a lot of discomfort to Lord Adisesa who was on the point of collapsing, gasping for breath. As soon as the dance came to end, Lord Vishnu’s body became light again.
Lord Adisesa was amazed with this sudden transformation and asked his master about the cause of these stupendous changes. The Lord explained that grace, beauty, majesty and grandeur of Lord Shiva had created a corresponding graceful vibration in His own body. Amazed at this, Adisesa professed a desire to learn dancing to inspire his Lord.
Lord Vishnu predicted that soon Lord Shiva would grace Lord Adisesa to write a commentary on grammar and at that time he would also be able to devote himself to perfection in the art of dance (nrtya). Lord Adisesa was overjoyed by these words and looked forward to the grace of Lord Shiva. He then began to meditate to find out who would be his intended mother. While meditating, he had the vision of a female Yoga adept and an ascetic (ayogini and tapasvini), Gonika who was praying for a worthy son to whom she could impart her knowledge and wisdom. He realized that she would be a worthy mother for him and waited for an auspicious moment to become her son.
Gonika, thinking that her earthly life was approaching its end, had searched for a worthy son to whom she could transmit her knowledge. But she had found no one. When her penance (tapas) had come to an end, she looked to the Sun God and prayed to Him to fulfill her desire. She took a handful of water, as a final oblation to Him, closed her eyes and meditated on the Sun. She opened her eyes and looked at her palms as she was about to offer the water. To her surprise, she saw a tiny snake moving in her palms who soon took on a human form. This tiny male human prostrated to yogini Gonika and asked her to accept him as her son. Hence, she named him Patanjali. ( Pata means fallen or falling and Anjali means palms folded in prayer).
This is how Sage Patanjali is said to have come into this mortal world.”