Tomato spotted wilt virus (TSWV) poses a serious threat to tomato (Solanum lycopersicum) production. In this study, a tomato inbred line YNAU335 was developed without the Sw-5 locus, which showed resistance or immunity to TSWV (absence of infection). Genetic analysis demonstrated that the immunity to TSWV was controlled by a dominant nuclear gene. The candidate genes were mapped into a 20 kb region in the terminal of the long arm of chromosome 9 using the bulk segregant analysis (BSA) and linkage analysis. In this candidate region, a chalcone synthase (CHS)-encoding gene (SlCHS3) was found to be a strong candidate gene for the TSWV resistance. The result showed that SlCHS3 silencing reduced the synthesis of flavonoids, and overexpression of SlCHS3 increased the content of flavonoids. The increased flavonoids could improve the ability of TSWV resistance in the tomato. These findings indicate that SlCHS3 is indeed involved in the regulation of the flavonoids synthesis and play a significant role in the TSWV resistance of YNAU335, it could provide new insights and lay the foundation for analyzing the TSWV resistance mechanisms.