Gospel of Thomas
Thomas may well have travelled to India via Egypt, but that would have been in the mid 1st century, and there is no record of him writing a text whilst in Egypt, nor leaving it in a cave at Nag Hammadi.
The Gospel of Thomas found at Nag Hammadi is in Coptic and likely to have been written in the early 4th century. It is nearly identical to the earlier Greek Gospel of Thomas, which survives in three fragmentary copies.
Modern scholars, notably Professor April D. DeConick, regard the Gospel of Thomas as being a text that developed during the first and early second centuries CE within an environment that was primarily oral rather than written. The earliest version, often refered to as ‘Kernel Thomas’, originated in Jerusalem in the years 30-50CE. This was taken to Edessa where the Syriac Christians used the sayings in oral performance, enhanced by additional sayings and interpretations. The Gospel of Thomas may have reached its present form, c.120CE. 
Bibliography: Jon Ma Asgeirsson, April D.DeConick, and Risto Uro, eds., Thomasine traditions in antiquity: the social and cultural world of the Gospel of Thomas (Leiden: Brill, 2006); Stevan Davies, The Gospel of Thomas: annotated and explained (Woodstock, VT: SkyLight Paths Publishing, 2002); April D. DeConick, Recovering the original Gospel of Thomas: a history of the Gospel and its growth (London: T & T Clark, 2005); April D. DeConick, ‘Reading the Gospel of Thomas as a repository of communal memory’ in Memory, Tradition, and Text: Uses of the Past in Early Christianity, edited by A. Kirk and T. Thatcher (Atlanta: Society of Biblical Literature, 2005):207-220; April D. DeConick, The original Gospel of Thomas in translation, with a commentary and new English translation of the complete Gospel (London: T & T Clark, 2006); April D. DeConick, ‘On the brink of the Apocalypse: a preliminary examination of the earliest speeches in the Gospel of Thomas’, in Thomasine traditions in antiquity: the social and cultural world of the Gospel of Thomas, edited by Jon Ma Asgeirsson, et al (Leiden: Brill, 2006):93-118; April D. DeConick, ‘The Gospel of Thomas’ Expository Times 118 (10), 2007:469-479;