Gilgamesh, the protagonist of the anonymous Sumerian epic "Gilgamesh", really should not be compared to either God or Adam in the Bible. He is the King of Uruk, and a fairly typical protagonist of oral epos, doing heroic deeds. This is a story of how the King evolves from the hero, first by accomplishing great feats and then by learning wisdom. Neither Adam nor God does anything of the sort. The God of the Hebrews starts out all-powerful and all-knowing and does not change and evolve and Adam, although mortal like Gilgamesh, really is not a hero. The figures with whom Gilgamesh should be compared are the kings and heroes in the Bible, such as David and Solomon.
Gilgamesh and Adam share some similarities. They both break divine prohibitions and suffer the consequences. They both loose chances of immortality. In each case, a snake is partly responsible for this loss and eternal life is associated with eating magical food. We find Adam and Gilgamesh clothed in animal skins after their respective punishments. The paradise motif is found in both Gilgamesh and Genesis, and in each the entrance is protected by fearsome guardians (scorpion men, cherubim). There does seem to be some cross over of imagery going on here, and this extends to other parts of the texts. The Genesis flood story, for example, is clearly modelled on the older Mesopotamian flood story found in Gilgamesh and Atrahasis.
Even closer parallels to the story of Adam and Eve are found in the account of Enkidu and Shamhat. Both stories involve the creation of a man from the earth who lives in a natural setting with animals for companions. In each case the man is tempted by a woman who introduces him to new food. The characters are naked, but later clothe themselves. Enkidu is told that he has become "wise" and "like a god", and this has strong echoes in Genesis when Eve is told that she will "be like God", and perceives that the fruit is desirable for "gaining wisdom". Finally, Enkidu, like Adam and Eve, experiences a transformation and cannot return to his former state.