Can God make a rock so big he can't move it? Can he make two mountains without making a valley in between? Computer programmers have a shorthand statement for such questions: GIGO (garbage in, garbage out). God is not obligated to do that which is logically contradictory, like making a square circle or a red number seven. Such "category mistakes" are not his fault but ours.
"Where did Cain get his wife?" can seem like more of the same, like asking "How much does green weigh?" It's a question first-graders like to ask to stump their teachers and parents. But it's actually a much better question than its critics think.
We know where Cain came from: "Adam lay with his wife, Eve; and she became pregnant and gave birth to Cain" (Gen 4:1). His name in Hebrew meant "acquired" or "brought forth." Later she gave birth to his younger brother "Abel"; his name meant "breath," "temporary," or "meaningless," foreshadowing what would come of his life.
After he murdered his brother, "Cain lay with his wife, and she became pregnant and gave birth to Enoch" (Gen 4:17). To Enoch was born Irad, who became the father of Mehujael, who became the father of Methushael, who became the father of Lamech (v. 18). No wives are named anywhere. Finally Lamech marries two women who are named: Adah and Zillah (v. 19).
Still later, Adam and Eve had a third child, a boy named Seth (Gen 4:25). Adam lived 800 years after Seth's birth and "had other sons and daughters" (v. 4).
Now, where did Cain get the wife who bore Enoch? For that matter, where did Enoch get his wife? And his daughter-in-law? And his grand-daughter-in-law?
It is said that we are successful if we can choose our problems in life. Such sentiment is often equally true of biblical interpretation. Here we have two options to consider. Each has an up side and a down side.
Cain married his sister
Option one: Adam and Eve bore daughters in addition to their sons, one of whom became Cain's wife. Nowhere does Genesis say that they bore only Cain and Abel before later creating Seth.
It was customary in Jewish genealogical records to list only the men, unless a woman's name was unusually important to the story (as with Lamech's bigamy). While this part of the Genesis record precedes Abraham and Judaism by many generations, the book was written and preserved by Jewish scholars and scribes. Thus their bias against including women in birth records would not be surprising here.
Here's the down side: Cain married his sister. While such a relationship would of course be problematic later, it was a necessity at this early point in human history. And so God protected mankind from the genetic problems such inbreeding can cause today. Nothing in the Genesis record makes this option impossible or even unlikely.
God created Cain's wife
Option two: God made more people after he made Adam and Eve. Either he made Cain's wife as he made Adam's, or he made her parents or ancestors. Nowhere does Genesis or the rest of Scripture state that God made only Adam and Eve.
In defense of this thesis, note Cain's protest when judged by God for murdering his brother: "I will be a restless wanderer on the earth, and whoever finds me will kill me" (Gen 4:14). In response, "The Lord put a mark on Cain so that no one who found him would kill him" (v. 15; sidebar note: the "mark of Cain" was not related to race). If Cain and his parents were the only humans alive on the planet at this time, why was he so afraid of others?
Perhaps his fear indicates the existence of large numbers of other people (or, alternately, he is afraid of future consequences when mankind grows more populous). If many people were living at the time, perhaps they were the offspring of another parental couple or couples (or, alternately, perhaps they were more of Adam and Eve's unnamed children).
Here's the down side: God made people besides Adam and Eve whose stories are left out of the biblical record. Where did they live after the expulsion from Eden? Did they commit their own "original sin," since they were not descended from Adam? Why does the Bible nowhere mention them?
The down side of option #2 makes it unlikely to me, so I'll go with the first option. With this additional note of relevance: Jesus' birth and life were exceptionally inclusive of all humanity. While Genesis records no women by name in the early line of human history, Jesus' genealogy lists four notorious exceptions to this rule: Tamar the temptress, Rahab the prostitute, Ruth the foreigner, and the adulterous mother of Solomon (cf. Mt. 1:1-18). Women may not have been named in the creation of humanity, but they are included in the story of its redemption.
When people write the history of this generation, it is possible that no one will include your name or mine. But don't worry—the Lord of the universe knows who you are. And his record is the only one that matters.