In 1945, a cache of ancient texts was discovered in Nag Hammadi, Egypt. The most important of these texts was the Gospel of Thomas, the first page of which is pictured below.
The Gospel of Thomas is a collection of sayings that the author claims were spoken by "the living Jesus". Now, to many members of the LDS Church, the idea of Jesus-isms that can't be found in the standard works makes one quite uneasy. While we are told that if we wrote everything that Jesus said or did, "the world itself could not contain the books that should be written", a lot of the stuff claiming to be said by Jesus is, without a doubt, crap. Out of this concern, let me assuage the reader by saying that I believe the Gospel of Thomas to be mostly, if not entirely, out of Jesus' mouth. How do I know this? It is simply because the ideas within them seem so profound that I do not believe they could have had human origin.
Interestingly enough, there is a section in the Doctrine and Covenants which, if boiled down to its bare essentials, has practically the same message as the aforementioned gospel. This is section 88. In this post I will essay to show, through side-by-side comparison, that these two works come from the same source, as they are both inspired.
First, let me share with you saying 77 from the Gospel of Thomas:
"It is I who am the light which is above them all. It is I who am the all. From me did the all come forth, and unto me did the all extend. Split a piece of wood, and I am there. Lift up the stone, and you will find me there."
Next, for comparison, consider D&C 88:41:
"He comprehendeth all things, and all things are before him, and all things are round about him; and he is above all things, and in all things, and is through all things, and is round about all things; and all things are by him, and of him, even God, forever and ever."
As you can see, these two are radically similar. Both tell us that God surrounds the universe in different ways, and both tell us that God can be found anywhere and everywhere.
Next, here is Thomas's saying number 3:
"The kingdom is inside of you, and it is outside of you. When you come to know yourselves, then you will become known, and you will realize that it is you who are the sons of the living father. But if you will not know yourselves, you dwell in poverty and it is you who are that poverty"
Compare that to D&C 88:47-50:
"Behold, all these are kingdoms, and any man who hath seen any or the least of these hath seen God moving in his majesty and power. I say unto you, he hath seen him; nevertheless, he who came unto his own was not comprehended. The light shineth in darkness, and the darkness comprehendeth it not; nevertheless, the day shall come when you shall comprehend even God, being quickened in him and by him. Then shall ye know that ye have seen me, that I am, and that I am the true light that is in you, and that you are in me; otherwise ye could not abound."
Consider the last sentence in the D&C excerpt. Could there be a more glorious good news that this, that God lives in us, and that we live in him? And could there be a more perfect match for Thomas 3? He is inside us, and by knowing ourselves, we can know Him.
As a brief digression, let me expound on the D&C verses for a bit. It says earlier in the same chapter that "there is no space in the which there is no kingdom; and there is no kingdom in which there is no space", meaning together with the above quotation that whenever we see, we see kingdoms, and therefore see God. However, it also says that, despite our seeing Him, we do not comprehend Him. God is figuratively camouflaged, visible to all, yet hidden in plain sight. But one day, it says, we will see him for what He is, and we will know that He has never left our view.
Finally, consider number 5 of Thomas's sayings:
"Recognize what is in your sight, and that which is hidden from you will become plain to you . For there is nothing hidden which will not become manifest."
Together with D&C 88:66-67:
"Truth abideth and hath no end; and if it be in you it shall abound. And if your eye be single to my glory, your whole bodies shall be filled with light, and there shall be no darkness in you; and that body which is filled with light comprehendeth all things."
Both excerpts offer the possibility of omniscience, if we will only pay attention to the light of God eternally before our eyes. If we become single to the glory of God, we will comprehend all things, and nothing will be hidden from us ever again.
That's about it. There are many more similarities, which I won't go into. You can, though. I urge you to read both works, as they each contain the light of the Gospel.