The explanatory gap is a term coined by Joseph Levine and used in the philosophy of mind to refer to the absence of a generally acceptable physical monist explanation for mental phenomena like consciousness, self-awareness or the experiencing of qualia. Essentially, the claim is that phenomenal consciousness, the actual subjective experiencing of qualia such as colors or pain has not been explained in physical terms. On one side of the gap there is the human mind, of which we are each intimately and perhaps directly aware; on the other side are all the attempts to explain, model or even recreate mind. The explanation that closes the gap must tell us what mind or mental experiencing is and how it comes about in physical terms.
For example, we can describe patterns of nerve cells firing or neural pathways from the retina of the eye to the visual cortex of the brain and on to other functional brain areas, but none of that seems to connect directly to the subjective experience, or what it actually 'feels like' or 'is like' to see red or have pain. This gap (or chasm, as some have suggested) is what makes the hard problem hard. It is an essential attack on materialism or physicalism in the mind-body discussion. Another aspect of the 'gap' is that even if the experiencing of qualia is a physical state or results from one, the distinctive features of qualia cannot actually be described. What makes red 'red'? How can you speak to someone about red unless they have experienced it themselves previously? To share the concept, you have to first share the experience. Here, the claim is that qualia are irreducible or indescribable, and thus beyond the scope of any explanation or even communication without the sharing of specific experiences. The seeming essentialness of the subjective experience to sentience also bears on the discussion of machine intelligence and sentience.
What makes this an unavoidable problem is that phenomenal experience is very powerfully self-evident and undeniable to each of us individually, yet it is not something than can be shared directly. There is no mind-meld technique yet available to us. It is this subjective experience that provides the base for our consciousness and our selves. It is what it means to be for us, for us to be us. It's not something that can go away, like the concepts of the ether, phlogiston or Maxwell's demon or other mistaken concepts.
There are three basic stances regarding the explanatory gap. Some philosophers say, "Gap? What gap?" They deny that an explanatory gap exists, claiming that either mental phenomena can be, or indeed already have been, explained in physical terms alone or that the gap is just an illusion and qualia don't exist (e.g., Daniel Dennett, Paul Churchland, Patricia Churchland, and Michael Tye). Others agree that the gap exists (i.e., that mental phenomena have not been adequately explained in physical terms), but they do believe that a purely physical explanation will eventually be achieved, once the proper conceptual framework has been established (Thomas Nagel and John Searle). The third group insists not only that the gap exists, but also that no purely physical explanation is even possible, because the stuff of mind is entirely different from the stuff of physics. These are the anti-materialists or dualist-interactionists (e.g., David Chalmers, Karl Popper and John Eccles). Chalmers is the contriver of the famous philosophical zombie argument. He asks us to imagine something that is like a human in every respect except that it is not conscious. We can do so, maybe with some difficulty, but in any case we say, "OK." just to hear the argument. He then says, "There! Something is missing in that creature, even though it is physically identical to a human being, so physicalism is baloney!" And such is how the arguments go and reputations are built.
The closing of the explanatory gap, or at least positive affirmation that the gap is illusory, is the nut of the problem for a materialist solution to the mind-body problem. For the anti-materialists, the need is to develop something more convincing than a prima facie argument to prove that a materialist explanation is impossible. Until one or the other occurs, the situation will remain in stalemate, with both sides simply believing what they are inclined to believe and continuing to build careers on supporting their beliefs in ways that are generally acceptable only to those predisposed to believe.
In this age of machines that are able to behave with more and more apparent intelligence, however, the need for an 'explanation' of mind/consciousness/self is earning a practical importance beyond serving as fodder for the arguments of philosophers. If machines can be given or can develop minds in the sense of human minds, or even animal minds, if they can 'feel' and we can ask the question 'what is it like to be an artificial intelligence', then the ethics of our interaction with them will have to be much different from the negative case.