Heat stress represents a major environmental factor that negatively affects the health and performance of dairy cows, causing huge economic losses to the dairy industry. Identifying and selecting animals that are thermotolerant is an attractive alternative for reducing the negative effects of heat stress on dairy cattle performance. As such, the objectives of the present study were to estimate genetic components of milk yield, fat yield, and protein yield considering heat stress and to perform whole-genome scans and a subsequent gene-set analysis for identifying candidate genes and functional gene-sets implicated in milk production under heat stress conditions. Data consisted of about 254k test-day records from 17,522 Holstein cows. Multi-trait repeatability test day models with random regressions on a function of temperature-humidity index (THI) values were used for genetic analyses. The models included herd-test-day and DIM classes as fixed effects, and general and thermotolerance additive genetic and permanent environmental as random effects. Notably, thermotolerance additive genetic variances for all milk traits increased across parities suggesting that cows become more sensitive to heat stress as they age. In addition, our study revealed negative genetic correlations between general and thermotolerance additive effects, ranging between −0.18 to −0.68 indicating that high producing cows are more susceptible to heat stress. The association analysis identified at least three different genomic regions on BTA5, BTA14, and BTA15 strongly associated with milk production under heat stress conditions. These regions harbor candidate genes, such as HSF1, MAPK8IP1, and CDKN1B that are directly involved in the cellular response to heat stress. Moreover, the gene-set analysis revealed several functional terms related to heat shock proteins, apoptosis, immune response, and oxidative stress, among others. Overall, the genes and pathways identified in this study provide a better understanding of the genetic architecture underlying dairy cow performance under heat stress conditions. Our findings point out novel opportunities for improving thermotolerance in dairy cattle through marker-assisted breeding.