You expect nearly every culture to have a story about the worst flood that every hit them. But in the Gilgamesh myth, which long predates Genesis, God asked a righteous man to build and ark, giving its precise dimensions, put two of each kind of animal on it. God flooded the world killing all the wicked. The man sent out a raven and a dove and he did a burnt offering.
If you were a fifth grade teacher marking papers, you would call that plagiarism.
The important difference is Genesis offers this as fact, where Gilgamesh is just a poem.
Genesis is like turning in a paper entitled My Summer Vacation then stealing the plot from Meatballs and desperately trying to justify its improbabilities.~ Roedy (1948-02-04 age:69)