Background: Chronic periodontitis and gingivitis are associated with various diseases; however, their impact on dementia is yet to be elucidated. This study is aimed at investigating the association between chronic periodontitis and gingivitis, and the risk of developing dementia. Methods: A total of 2,207 patients, with newly diagnosed chronic periodontitis and gingivitis between January 1, 2000 and December 31, 2000, were selected from the National Health Insurance Research Database of Taiwan, along with 6,621 controls matched for sex and age. After adjusting for confounding factors, Cox proportional hazards analysis was used to compare the risk of developing dementia during the 10-year follow-up period. Results: Of the study subjects, 25 (1.13%) developed dementia compared to 61 (0.92%) in the control group. Cox proportional hazards regression analysis revealed that the study subjects were more likely to develop dementia (hazard ratio (HR) 2.085, 95% CI 1.552-4.156, p < 0.001). After adjusting for sex, age, monthly income, urbanization level, geographic region, and comorbidities, the HR for dementia was 2.54 (95% CI 1.297-3.352, p = 0.002). Conclusions: Patients with chronic periodontitis and gingivitis have a higher risk of developing dementia. However, further studies on other large or national data sets are required to support the current findings.