The Epic of Gilgamesh and Genesis both contain stories of a flood that wipes out almost all living things. Compare these stories and their heroes.
The heroes are Utnapistim and Noah. How might you account for the similarities between the two stories?
The stories are very similar, but contain minor differences. As humbahaha pointed out, the Genesis flood is sent because of humanity's wickedness, while the Gilgamesh flood happens due to mankind becoming too numerous and noisy ("Enlil heard the clamour and he said to the gods in council, 'The uproar of mankind is intolerable and sleep is no longer possible by reason of the babel.'"). Additionally, the storm in Gilgamesh pours down for six days and six nights, compared to the 40 in Genesis. And while Utnapishtim sends a bird thrice from his boat, Noah sends it 4 times - it returns the third time with an olive branch, and the fourth not at all.
There are, of course, other differences dealing with the end of the story, as Utnapishtim gains immortality and Noah is told to repopulate the Earth, etc.
The stories are almost identical apart from some minor details and a few significant plot and theological differences - e.g. the flood is sent because of human wickedness and violence in Genesis, whereas it is sent because humans have become too numerous in Gilgamesh.
It would be easy to assume that the hero of the Gilgamesh story is Utnapishtim. However, it would not be hard to make a case for the god Ea as the real hero. He is the one who stands up to Enlil and rebukes him for sending the flood and causing such a great loss of life. In Genesis Noah takes a slightly more active role but does not question the morality of God's "final solution".
The similarity of the two stories can be put down to Genesis using the older Mesopotamian myth but modifying it to fit in with its monotheistic outlook and the recurrent themes of recreation (Genesis 1-3), exodus/exile, and covenant.