Polyphenism, the extreme form of developmental plasticity, is the ability of a genotype to produce discrete morphologies matched to alternative environments. Because polyphenism is likely to be under switch-like molecular control, a comparative genetic approach could reveal the molecular targets of plasticity evolution. In the nematode Pristionchus pacificus, which form two alternative feeding-morphs, the polyphenism threshold is set by relative dosage of two lineage-specific enzymes that respond to morph-inducing cues. One enzyme, the sulfotransferase SEUD-1, integrates an intercellular signalling mechanism at its ultimate target, the cells producing dimorphic mouthparts. Additionally, multiple alterations of seud-1 support it as a potential target for plasticity evolution. First, a recent duplication of seud-1 in a sister species reveals a direct correlation between genomic dosage and the polyphenism threshold. Second, laboratory selection on the polyphenism threshold resulted in changes in relative transcriptional dosage. Our study thus offers a genetic explanation for how plastic responses evolve.