This is the Adhi Keshav temple and the Adhi Keshav Ghat in Varanasi.
River Ganges is originally Trivikraman's Sri Pada Theertam - the water that washed the holy feet of Trivikraman. When the Lord had taken Vamana Avatar and then took the huge form of Trivikraman to measure the lower seven worlds with one foot and upper seven with one foot, His right foot reached Brahma's Satya Loka. Seizing this opportunity, Brahma instantly washed His foot and offered his prayers to it. This water that he washed His feet with became Ganga and is flowing as a river even today in Satya Loka. It was this river that Bhageerata brought down to earth after performing penance. In order to regulate her flow, Shiva offered to receive her on his head and regulate the flow through his hair. This is the first source of dosham or impurity for Ganga.
After Shiva regulated her flow on earth, she was flowing unhindered when she disturbed Maharishi Jahnu's penance. The angered rishi swallowed her. Upon Bhageerata's request, he let her go through his ears. That is how she got her name as Jhanavi. This is her second source of dosham or impurity - as she had become the uchishtam (jhoota or echil) of Jahnu maharishi.
At the Adhi Keshav Ghat in Varanasi, Swami Ramanuja during his all India digvijayam (tour) released her from those impurities by washing his feet. Ramanuja, an avatar of Adiseshan or Seshnag, thus helped river Ganges regain her purity at Varanasi.