When a species encounters novel environmental conditions, some phenotypic characters may develop differently than in the ancestral environment. Most environmental perturbations of development are likely to reduce fitness, and thus selection would usually be expected to favor genetic changes that restore the ancestral phenotype. I propose the term "genetic compensation" to refer to this form of adaptive evolution. Genetic compensation is a subset of genetic accommodation and the reverse of genetic assimilation. When genetic compensation has occurred along a spatial environmental gradient, the mean trait values of populations in different environments may be more similar in the field than when representatives of the same populations are raised in a common environment (i.e., countergradient variation). If compensation is complete, genetic divergence between populations may be cryptic, that is, not detectable in the field. Here I apply the concept of genetic compensation to three examples involving carotenoid-based sexual coloration and then use these and other examples to discuss the concept in a broader context. I show that genetic compensation may lead to a cryptic form of reproductive isolation between populations evolving in different environments, may explain some puzzling cases in which heritable traits exposed to strong directional selection fail to show the expected evolutionary response, and may complicate efforts to monitor populations for signs of environmental deterioration.