I'm glad you brought up Gilgamesh, however, because there is a tremendous amount of literary evidence that parts of the Bible were modeled after passages of Gilgamesh.
I had a student once in a World Literature class I was teaching who compared Gilgamesh to the Biblical stories of Saul and Samuel.
The comparisons are striking, especially as to the characters.
Right-o. Also, every single ancient civilization was built next to a river, or better yet, the confluence of rivers. Flooding was perhaps an annual event at the very least for almost every ancient city. That explains why so many different cultures have the flood stories, rather than say, blizzard or tornado stories.
Floods also were used for early farming techniques and were an integral part of ancient life. It's easy to surmise how the Noah story (and the others) came to be.