Climate change is considered a major threat to society and nature. UV irradiation is the most important environmental genotoxic agent. Thus, how elevated UV irradiation may influence human health and ecosystems has generated wide concern in the scientific community, as well as with policy makers and the public in general. In this study, we investigated patterns and mechanisms of UV adaptation in natural ecosystems by studying a gene-specific variation in the potato late blight pathogen, Phytophthora infestans. We compared the sequence characteristics of radiation sensitive 23 (RAD23), a gene involved in the nucleotide excision repair (NER) pathway and UV tolerance, in P. infestans isolates sampled from various altitudes. We found that lower genetic variation in the RAD23 gene was caused by natural selection. The hypothesis that UV irradiation drives this selection was supported by strong correlations between the genomic characteristics and altitudinal origin (historic UV irradiation) of the RAD23 sequences with UV tolerance of the P. infestans isolates. These results indicate that the RAD23 gene plays an important role in the adaptation of P. infestans to UV stress. We also found that different climatic factors could work synergistically to determine the evolutionary adaptation of species, making the influence of climate change on ecological functions and resilience more difficult to predict. Future attention should aim at understanding the collective impact generated by simultaneous change in several climate factors on species adaptation and ecological sustainability, using state of the art technologies such as experimental evolution, genome-wide scanning, and proteomics.