Description of Jñānavāpī (Gyanvapi) or Jñānodatīrtha, and its mahatmya is extensively mentioned in many chapters of Kāśī Khanda of Skanda Purana.
In one of the early Satya Yugas, Īśāna was roaming on Earth and found scarcity of water. After reaching Kāśī and seeing Swayambhu Viśveśvara Linga, desire of bathing linga in cool waters came to his mind and dug a well. This well is known as Jñānodatīrtha. This is how Chapter 33, Pūrvārdha of Kāśī Khanda describes this.
अस्येशानस्य तल्लिंगं दृष्ट्वेच्छेत्यभवत्तदा |
स्नपयामि महल्लिंगं कलशैः शीतलैर्जलैः || १६ ||
16. On seeing that Liṅga, there arose an idea in the mind of this Īśāna, ‘Let me bathe this great Liṅga with potfuls of cool water.’
चखान च त्रिशूलेन दक्षिणाशोपकंठतः |
कुंडं प्रचंडवेगेन रुद्रोरुद्रवपुर्धरः || १७ ||
17. Īśāna who was identical with Rudra in a terrible physical frame, dug up a deep pit with terrific speed by means of his trident. The
place was to the south of Viśveśa and very near him.
पृथिव्यावरणांभांसि निष्क्रांतानि तदा मुने |
भूप्रमाणाद्दशगुणैर्यैरियं वसुधावृता || १८ ||
18. Then, O sage, columns of waters covering the earth and ten times its size, came out whereby the whole of the world was inundated on all
तैर्जलैः स्नापयांचक्रे त्वत्स्पृष्टैरन्यदेहिभिः |
तुषारैर्जाड्यविधुरैर्जंजपूकौघहारिभिः || १९ ||
19. With those waters as cool as snow, but devoid of Jāḍya (i.e. of the nature of knowledge), which removed clusters of sins and which
were untouched by other embodied beings, he bathed (the Liṅga).
ज्योत्स्नावदुज्ज्वलच्छायैः पावनैः शंभुनामवत् || २० ||
20. The waters were sparkling in colour like the (pure) minds of good people. They had bluish tinge like the path of the sky. Their lustre
was brilliant like moonlight; they were holy and pure like the names
पीयूषवत्स्वादुतरैः सुखस्पर्शैर्गवांगवत् |
निष्पापधीवद्गंभीरैस्तरलैः पापिशर्मवत् || २१ ||
21. They were excessively sweet like the divine nectar; pleasant to the touch like the limbs of a cow; had grandeur like the intellect of
a sinless person and were sparklingly moving to and fro (fickle) like
the happiness of the sinners.
विजिताब्जमहागंधैः पाटलामोदमोदिभिः |
अदृष्टपूर्वलोकानां मनोनयनहारिभिः || २२ ||
22. Their scent excelled the sweet smell of lotuses; they were delightful with the fragrance of the Pāṭalā flowers. They attracted
the minds and the eyes of the people in an unprecedented way.
अज्ञानतापसंतप्त प्राणिप्राणैकरक्षिभिः |
पंचामृतानां कलशैः स्नपनातिफलप्रदैः || २३ ||
23. They were, as though, the sole protectors of the vital airs of all living beings, distressed through the heat of ignorance. They were
capable of yielding more benefit than bathing with potfuls of
Pañcāmṛta (curd, milk, ghee, honey and sugar).
श्रद्धोपस्पर्शि दृदयलिंग त्रितयहेतुभिः |
अज्ञानतिमिरार्काभैर्ज्ञानदान निदायकैः || २४ ||
24. They were the producers of three Liṅgas(?) in the hearts of those regularly performing the ceremonious rinsing of the mouth with faith;
they functioned like the sun in dispelling the darkness of ignorance;
they yielded the benign gifts of wisdom.
Viśveśvara pleased with Īśāna manifested before him and asked for boon. Īśāna asked Viśveśvara to name well after him. This is what Viśveśvara says:
विश्वेश्वर उवाच |
त्रिलोक्यां यानि तीर्थानि भूर्भुवःस्वः स्थितान्यपि |
तेभ्योखिलेभ्यस्तीर्थेभ्यः शिवतीर्थमिदं परम् || ३१ ||
31. This Śiva Tīrtha is greater than all those Tīrthas situated in the three worlds, viz., Bhūḥ, Bhuvaḥ and Svaḥ.
शिवज्ञानमिति ब्रूयुः शिवशब्दार्थचिंतकाः |
तच्च ज्ञानं द्रवीभूतमिह मे महिमोदयात् || ३२ ||
अतो ज्ञानोद नामैतत्तीर्थं त्रैलोक्यविश्रुतम् |
अस्य दर्शनमात्रेण सर्वपापैः प्रमुच्यते || ३३ ||
32-33. Those who ponder over the meanings of the word, say that Siva
means knowledge (wisdom). Here, due to my greatness, that knowledge is
liquified (i.e., has taken a watery form). Hence this Tīrtha has
become reputed in all the three worlds by the name Jñānoda. Merely at
the sight of this Liṅga, one is rid of all sins.
Viśveśvara further explains benefits one can accrue by doing various religious acts here and also says he bestows Knowledge destroying ignorance.
ज्ञानोदतीर्थपानीयैर्लिंगं यः स्नापयेत्सुधीः |
सर्वतीर्थोदकैस्तेन ध्रुवं संस्नापितं भवेत् || ४९ ||
49. If a highly intelligent man bathes the Liṅga with the waters of Jñānodatīrtha, it is certainly on a par with having got it bathed with
the waters of all the Tīrthas.
ज्ञानरूपोह मेवात्र द्रवमूर्तिं विधाय च |
जाड्यविध्वंसनं कुर्यां कुर्यां ज्ञानोपदेशनम् || ५० ||
50. I myself, in the form of Jñāna, having assumed the liquid form, shall destroy Jāḍya (sluggishness, ignorance) and impart knowledge.