Yes. The gene is called LCT. It encodes the protein "lactase". Anything ending in "-ase" is an enzyme, one that usually facilitates the breaking of another molecule into pieces. In this case, lactase breaks lactose into two subunit sugars (glucose and galactose), which then are able to be handled by the body's energy-production pathways.
The LCT gene has been characterized by looking at the DNA sequences that code for LCT in many people of many races. Differences among ethnic groups have been found. This makes the LCT gene a polymorphic one - poly-morphic means "produces many shapes".
Because there are different kinds of LCT encoding, there are different types of lactose intolerance. One type is due to lack of drinking milk. This tells us that the lactase gene is an "inducible" gene - when there is a substrate for the enzyme, then we will make it, but not before. For people with this problem, slowing increasing milk intake will induce the production of the enzyme and the condition will go away. For some others, this type of intolerance starts at 3-5 years of age and they cannot ever produce the normal levels that were there in infanthood.
For yet others, the gene will not produce a functional protein - ever. But we have two copies of each gene: one from mother and the other from father. In the case that someone does inherit two defective genes, at no time in their life will they tolerate lactose. Those people can take lactase pills prior to eating something with lactose.
To complicate things, there is a gene just before the LCT gene that also affects some types of lactose intollerance. Lactase is important for all mammals, and experiments with pigs and rats have been done to figure out how it functions.
To learn more visit The Online Mendelian Inheritance in Man (OMIM) database at the US national Center for Biotechnology Information. At the top of that page you can type in any type of genetic condition and search for information. OMIM services are associated with Genebank, the Human Gemome Project and much more. It is a huge scientific database and OMIM is great to learn about genetic diseases. It may take some scientific knowledge to explain the details but you will find information there about the various races and ethnic groups that have been tested so far for lactose intollerance.