Gilgamesh was an ancient King from the oldest civilisation known to man, the Sumerians. He reigned sometime between 3000 and 2500 BC in the city-state of Uruk near the Euphrates in what is now southern Iraq. According to the Babylonian epic, Gilgamesh himself inscribed his tale of the time before the Flood on a stone tablet, making it is one of the earliest works of literature known to man.
Like all epics, Gilgamesh contains both historical and mythic elements in all its versions, and thus is meant to be interpreted on several levels. In addition to its very human themes of friendship, courage, the problem of death, and the meaning of life, it is also an initiatory tale about the quest for enlightenment, the revelation of divine mysteries, the duality of man, and the evolutionary unfoldment of our spiritual nature. Implicit in the narrative are the cosmology and other metaphysical doctrines of the ancient sanctuaries.
You can read a translation of the 11 tablets of the epic of Gilgamesh here, which Scholars around the world have acknowledged contains striking similarities to the old testament, although it preceeds it by many, many years.
There is also a good synopsis here which makes for easier reading with additional explanation.