Never having read the Book of Thomas, I can't comment on that; but there are secret books in the Bible.
See 2 Esdras 14 : 1 - 7 (New Revised Standard Version Oxford) Re secret books of Moses
2 Esdras 14 : 1 - 7 (New Revised Standard Version)
On the third day, while I was sitting under an Oak, suddenly a voice came out of a bush opposite me and said, "Ezra, Ezra !" And I answered, "Here I am, Lord ," and I rose to my feet. Then he said to me, "I revealed myself in a bush and spoke to Moses when my people were in bondage in Egypt ; and I sent him and led my people out of Egypt ; and I led him up on Mount Sinai, where I kept him with me many days . I told him many wondrous things , and showed him the secrets of the times and declared to him the end of times . Then I commanded him saying , ‘These words you shall publish openly, and these you shall keep secret.’
See 2 Esdras 14 : 19 - 26 & 37 - 48 (New Rervised Standard Version Oxford) Re secret books of Esdras
2 Esdras 14 : 19 - 26 (New Revised Standard Version)
Then I answered and said, "Let me speak in your presence Lord . For I will go as you have commanded me , and I will reprove the people who are now living ; but who will warn those who will be born hereafter ? For the world lies in darkness , and its inhabitants are without light . For your law has been burned , and no one knows the things which have been done or will be done by you . If then I have found favour with you , send the Holy Spirit into me , and I will write everything which has happened in the world from the beginning , the things that were written in your law , so that people may be able to find the path , and that those who want to live in the last days may do so . He answered me and said "Go and gather the people , and tell them not to seek you for forty days. But prepare for yourself many writing tablets , and take with you Sarea , Dabria , Selemia , Ethanus , and Asiel – these five , who are trained to write rapidly ; and you shall come here , and I will light in your heart the lamp of understanding , which shall not be put out until what you are about to write is finished . And when you have finished , some things you shall make public , and some you shall deliver in secret to the wise ; tomorrow at this hour you shall begin to write."
2 Esdras 14 : 37 - 48 (New Revised Standard Version)
So I took the five men as he commanded me , and we proceeded to the field , and remained there . And on the next day a voice called me saying , "Ezra , open your mouth and drink what I give you to drink ." So I opened my mouth , and a full cup was offered to me ; it was full of something like water , but its color was like fire . I took it and drank ; and when I had drank it , my heart poured forth understanding , and wisdom increased in my breast , for my spirit retained its memory , and my mouth was opened and no longer closed . Moreover , the Most High gave understanding to the five men , and by turns they wrote what was dictated , using characters that they did not know . They sat forty days ; they wrote during the daytime , and ate their bread at night . But as for me , I spoke in the daytime and was not silent at night . So during the forty days , ninety-four books were written . And when the forty days ended , the Most High spoke to me , saying , "Make public the twenty-four books that you wrote first , and let the worthy and the unworthy read them ; but keep the seventy that were written last , in order to give them to the wise among your people . For in them is the spring of understanding , the fountain of wisdom , and the river of knowledge . " And I did so .
See Mark 4 : 21 - 25 (Revised Standard Version) Re secret things coming to light
Mark 4 : 21 - 25 (Revised Standard Version)
And he said to them , "Is a lamp brought in to be put under a bushel , or under a bed , and not on a stand ? For there is nothing hid except to be made manifest ; nor is anything secret , except to come to light . If any man has ears to hear , let him hear ." And he said to them , "Take heed what you hear ; the measure you give will be the measure you get , and still more will be given you . For to him who has will more be given ; and from him who has not , even what he has will be taken away ."
Problem being those who don't believe there are secret things, won't believe said secret things when they do come to light.