Most of the time, the term "demigod" is used to describe people who are the offspring of a god and a human. As far as I know, Gilgamesh is the child of a goddess and a king. Why then is Gilgamesh considered to be one-third human and two-third god when he is the offspring of a god(dess) and a human? Is there a story behind this, one that's about his conception?
Gilgamesh was a recurring character in Mesopotamian myths/stories. The most renown of those stories is the Epic of Gilgamesh where those numbers appears. But he and his slave/servant/friend/buddy/lover Enkidu are in numerous other stories. And in none other those funny proportions are mentioned.
It is also good to be aware that the Epic comes to us in various versions. There is no (right now) any complete version of the myth per se. It is just a reconstruction from different tablets.
Now the Epic does not give any rational explanation about the proportion. Just remind it is barely a detail trying to make clear Gilgamesh is far beyond any normal human being. As long as it is striking you enough as being "totally abnormal" the one who wrote it did succeed.
Presumably because he seemed that much more like a god than like a man.
Our present understanding of heredity was not yet available, and absent that, the proportion between the genetic inheritances from father and mother was pretty much anyone’s guess. In the Eumenides of Aeschylus, the god Apollo claims the father’s share is 100%! (The chorus of Furies does not buy it.) Sterne in Tristram Shandy (Vol. 1  Chap. 2) mocks the somewhat similar theory of the spermatozoon as containing a miniature but complete version of the person to be begotten, the homunculus.
Even with the benefit of modern understanding of chromosomes, meiosis, and fertilization, the notion persists that one can be one-quarter Czech (or whatever), because exactly one grandparent was supposedly pure Czech, despite the obvious arithmetical fact that the number of chromosomes in our species’ somatic cell nuclei, forty-six, is not an integral multiple of four. This obsolete notion is even written into current law, with current real consequences, as applied to membership in recognized Indian tribes within the United States.
He had three parents.
The belief in the divinity of royal lines, in several ancient cultures of the region, was maintained by the concept that the king was possessed by a god (usually the head of the pantheon) on the night that he begot the next king. In this way each king is both the son of his father (the last king) and a god.
In the case of Gilgamesh his mother was also a goddess. So he had two parents who were gods and one parent who was mortal making him 2/3rds divine.
I'd suggest that this comes from an early understanding of consciousness as partaking in an element of the divine. Compare, say, with the divine spark in Greek myth. But of course we are also human. Hence early mythology had demi-gods and heroes that straddled both worlds.
I've always considered this interesting in the light of Christian theology, where Christ himself is understood as being a hypostasis of the human and the divine. It feels reminiscent of this early understanding of mythology. Of course, most Christians take this as a reality.
This is actually because of a ritual practiced in ancient near eastern cultures. A king (considered a god) would ritually sleep with the goddess of the city in the temple. In order to enact this, he would actually sleep with one of the "temple virgins" serving in that goddess' temple. So, by this "math", only one of the parents (the temple virgin) was human.