Is the Epic of Gilgamesh all myth or is there some real history sprinkled in it
The Epic of Gilgamesh is, perhaps, the oldest written story on Earth. It comes to us from Ancient Sumeria, and was originally written on 12 clay tablets in cunieform script. It is about the adventures of the historical King of Uruk (somewhere between 2750 and 2500 BCE). http://en.wikipedia.org/wiki/Epic_of_Gilgamesh
The Epic is the earliest creation myth. The story is common throughout the world, in Egypt in 3000BC, in the Hopi Indians in America, with the Indians of the nasca plain 2000 years ago, as well as in mesopotamia. The key is to understand that "2/3" is a musical reference, gilgamesh travels in the heavens along lines connecting musical "fifths", so he travels from Gemini to Scorpio because they are 7 zodiac places apart clockwise and 5 anticlockwise. A scorpion has 5 moveable tail segments, so G moves anticlockwise, the "left hand path". He becomes the devil in christian era.
_______________
Please ignore the above answer. Gilgamesh is not the oldest written story, we do not know for certain that Gilgamesh was a historical king (although there is some evidence to support this), and it does not contain a creation myth. The musical and astrological assertions are completely speculative and Gilgamesh does not suddenly turn into the devil in the Christian era - although one of the evil antediluvian giants in the Enoch literature of the Dead Sea Scrolls has a similar name.
To answer your question, Gilgamesh is not, strictly speaking, a mythical story. Although there is an ongoing debate about the definition of mythology, two commonly accepted criteria are that myths have to do with the actions of the gods and are often aetiological (Andrew George, The Epic of Gilgamesh). Judged by these criteria, the genre of the Gilgamesh story is not mythical. It concerns the legendary exploits of Gilgamesh and Enkidu and is, ultimately, a very humanistic tale. It does contain myths, however, with the two prime examples being the flood story and the incident of the snake who steals the rejuvenating plant and gains the ability to shed its skin.
The story may contain some genuine historical allusions. If Gilgamesh actually was a historical king of Uruk it is likely that he did, indeed, engage in fortifying and building activities. He may have gone on expeditions to bring back cedar from distant locations - although this is barely mentioned in the Humbaba story. Perhaps he really did go on a long quest to obtain cultic knowledge from some ancient worthy. As you can see, most of these possibilities are highly speculative, although the original Sumerian Gilgamesh poems did include a story about a battle with the Kind of Akka that, broadly speaking, seems to reflect historical relations between the two city states around this period.