Background :
The story of the Godavari river is told from the Kotirudra Samhita of the Shiva Purana. The sage Gautama, is engaged in Tapasya (deep meditation) on the Brahmagiri mountain when there is a hundred-year drought in the area and thus crops can't grow. So for the welfare of others, he starts engaging in Tapasya to Varuna the ocean god, who appears before him after six months. Varuna denies Gautama's request for rain, because it would go against the wishes of the gods, so Gautama instead asks for "divine everlasting water yielding permanent results." So Varuna tells Gautama to dig a ditch, and then Varuna fills it with divine water and says this:
O great sage, let there be a perennial supply of water in this ditch that has become sacred. This will becomes famous on the earth by your name. Charitable gifts made here, rites performed here, penance pursued here, the sacrifices done here for the gods, and the Shraddha offered here to the manes, everything will be imperishable.
So Gautama and other sages in the area come to the new body of water and start planting crops and the like again. But on one occasion, Gautama sends his shishyas (disciples) to get water, but they're stopped by the wives of the other sages, who want to get water first. The disciples complain to Gautama's wife Ahalya, who goes to the body of water and collects water before everyone else. The other sages are furious at this petty incident, so to get revenge they pray to Ganesha, who appears before them. The sages ask him to force Gautama to leave his hermitage; Ganesha first advises them not to try to harm someone who has only done them good, but they insist.

So Ganesha approaches the sage Gautama, taking the form of a feeble cow, and starts eating Gautama's crops. To shoo the cow away, Gautama throws some blades of grass at it, but as soon as the grass touches the cow he sees it fall dead. Gautama is shocked that he has committed Gohatya (cow-killing), a supreme sin in the Hindu religion, so he takes his wife and leaves the hermitage in order to undertake an arduous course of repentance that involves circumambulating the Brahmagiri mountain, going around confessing his sin to everyone he encounters, and making Lingams to worship Shiva.
Finally Shiva appears before him, and Gautama asks to be made sinless. Shiva laughs and says that Gautama hasn't committed any sins, and that Gautama is such a great sage that even looking at him makes other people sinless. In any case, Gautama asks Shiva for Ganga to be brought there, so that he and others could be purified of their sins. So Shiva gives Gautama "the essence of the earth and heaven" which was apparently Gautama's inheritance from his father Brahma, and Gautama uses that essence to summon the goddess Ganga. Shiva tells this to Ganga:
O goddess, till the advent of the Kali Yuga, when the son of Vivasvat shall be the twenty-eighth Manu, you shall stay here alone.

Ganga says that she'll only agree to stay if Shiva also stays there, so Shiva manifests himself as Tryambakeshwara (meaning the three-eyed lord), one of the twelve Jyotirlingas (Lingas that appeared after Shiva manifested as a pillar of light.) Here is a picture of it:
So Ganga agrees to stay there as a new river, initially called the Gautami river but now known as the Godavari river. Gautama and his disciples bathe there to purify themselves of sin. And even the sages who tried to take revenge on Gautama are eager to get rid of the sins. Ganga is initially reluctant to purify these men who had been so cruel to Gautama, but then Gautama convinces her to relent and he digs a ditch for her to emerge from and purify the sages of their sins. That ditch is the famous Kushavartha Thirtha at the Tryambakeshwara temple.