Background: Herpesviruses and bacteria and their interplay have long been believed to play important roles in the pathogenesis of periodontitis, but other microbial entities in the oral environment might also be involved. Anelloviruses are commonly detected in human, including in oral samples. The aim of the present study was to explore the occurrence and co-occurrence of human cytomegalovirus (HCMV), Epstein-Barr virus (EBV), and human anelloviruses (HTTVs) in gingival tissue samples collected from participants recruited in Shanghai, China. Methods: Gingival tissues were collected from 159 participants (57 with aggressive periodontitis (AP), 59 with chronic periodontitis (CP) and 43 with healthy periodontal status). The presence of HCMV, EBV, torque teno virus (TTV), torque teno mini virus (TTMV) and torque teno midi virus (TTMDV) DNA was detected by nested-PCR. The virus loads were quantified by real-time PCR. Results: The detection rates of EBV, TTV, TTMV and TTMDV were significantly higher in the AP and CP groups compared to the healthy group (all P < 0.01). A statistically significant association was found between EBV, TTV and TTMV virus load and periodontitis (all P < 0.05). Participants infected with EBV showed significantly higher infection rates and higher virus loads of TTV and TTMV than the EBV-negative group (all P < 0.05). The coexistence rates of EBV and anelloviruses and the coexistence of three HTTVs were significantly higher in AP and CP groups (all P < 0.01). Conclusions: Collectively, results obtained in this study suggest that HTTVs and the coexistence of EBV and HTTVs in particular, may be associated with periodontitis. Possible mechanisms of the interaction between herpesviruses and anelloviruses in the context of periodontitis require further investigation.