In conclusion, CHAF1A, a novel biomarker associated with EBV infection, was revealed to be a predictor for prognosis and immunotherapy response in GC. This evidence concerns the gene CHAF1A and Epstein-Barr virus infection.