Wheat yellow mosaic virus (WYMV) is a pathogen transmitted into its host’s roots by the soil-borne vector Polymyxa graminis. Ym1 and Ym2 genes protect the host from the significant yield losses caused by the virus, but the mechanistic basis of these resistance genes remains poorly understood. Here, it has been shown that Ym1 and Ym2 act within the root either by hindering the initial movement of WYMV from the vector into the root and/or by suppressing viral multiplication. A mechanical inoculation experiment on the leaf revealed that the presence of Ym1 reduced viral infection incidence, rather than viral titer, while that of Ym2 was ineffective in the leaf. To understand the basis of the root specificity of the Ym2 product, the gene was isolated from bread wheat using a positional cloning approach. The candidate gene encodes a CC-NBS-LRR protein and it correlated allelic variation with respect to its sequence with the host’s disease response. Ym2 (B37500) and its paralog (B35800) are found in the near-relatives, respectively, Aegilops sharonensis and Aegilops speltoides (a close relative of the donor of bread wheat’s B genome), while both sequences, in a concatenated state, are present in several accessions of the latter species. Structural diversity in Ym2 has been generated via translocation and recombination between the two genes and enhanced by the formation of a chimeric gene resulting from an intralocus recombination event. The analysis has revealed how the Ym2 region has evolved during the polyploidization events leading to the creation of cultivated wheat.