After Enkidu's death, Gilgamesh started wandering the Earth in search for eternal life - trying to avoid the fate of his friend.
At some point he reached the gate through which the sun into the underworld at night. Going through the gate he reached the underworld. Here he discovered a forest where diamands and other precious stones grew on trees. He also found a sea with an island. On the island he found Utanapishtim, who told Gilgamesh thay he was granted eternal life by the gods as reward for building an ark when the head of the gods wanted to destroy all life on Earth.
His story contains an early version of the Noah's ark, written centuries before the biblical version.
The story matches closely. We read:
‘I loaded into her all that I had of gold and of living things, my family, my kin, the beast of the field both wild and tame, and all the craftsmen. [When the evening came], the rider of the storm sent down the rain. I looked out at the weather and it was terrible, so I too boarded the boat and battened her down. For six days and six nights the winds blew, torrent and tempest and flood overwhelmed the world, tempest and flood raged together like warring hosts.’
Then Utanapishtim send out three birds. Two return, meaning they did not find land. The third did not return, indicating that the water level was decreasing again.
There are also crucial difference between the story. Most crucial is the Biblical choice to make their God a moral actor. While the Mesopotamian gods flood the world because they are fed up with the noises that humans make, the God from the Bible upset about the sins of his creatures. In the Mesopotanian versions, the gods finally realize they rely on the humans to supply them with sacrifices. In the Bible, God shows mercy for humanity and promises never to again commit such an act.
"The Great World History Book"