Both may have one source. Many of the parallel theories may have one source. If you take both them as simple mythology, it could have one source that both picked up from. So parallelism doesnt mean one was taken from another as fact. Also, which one took from the other? Is it essential for the plagiarism theory that the Bible took from Gilgamesh? Is there some kind of rule or law? Nope. It's an inclination of the critic.
The elements are, (a) angry gods (b) generate a great flood (c) in order to wipe out mankind (d) but one human is forewarned (e) and builds a large floating device (f) and he and one or more family members survive (g) so the gods repent and let them live. As you can see on that link to Andrew George's translation of Gilgamesh, in the chapter "Tablet XI, Immortality Denied" the wise god Ea says to Uta-Napishti (in Sumerian, Ziusudra, in the bible Noah) ─
demolish the house and build a boat!
Abandon wealth and seek survival! [...]
Take on board all living things' seed.
The boat you will build,
her dimensions all shall be equal:
her length and breadth shall be the same,
cover her with a roof [...] (24-32)
Uta-Napishti agrees to do it (line 33). He builds the boat with an area of an acre, a height of ten rods, sides of ten rods, six decks, much tar.
He loads his silver and gold on board and ─
all the living creatures I had I loaded aboard.
I sent on board all my kith and kin,
the beasts of the field, the creatures of the wild, and members of every skill and craft. (84-6)
The deluge ends after seven days (130). "All the people [outside] had turned to clay".
The boat comes to rest on Mt Nimush (142). Seven days later ─
I brought out a dove, I let it loose:
off went the dove but then it returned,
there was no place to land (148-50).
The next, a swallow, also returns. The third, a raven, does not (155), and Uta-Napishti gives thanks ─ he offers incense and the gods are drawn to the place.
‘Then at once Belet-ili arrived,
she lifted the flies of lapis lazuli that Anu had made for their courtship:
“O gods, let these great beads in this necklace of mine
make me remember these days, and never forget them! (164-7)
So even the rainbow is derived from (at the least) the Akkadian version of the Sumerian story.
I don't think there can be any doubt that this earlier tale is the basis of the bible's Noah story, or alternatively that they are from a common and even earlier origin.