Objective Low serum 25-hydroxyvitamin D levels (25(OH)D < 50 nmol/L) are common in older persons and associated with depressive symptoms. Depression and anxiety are highly interrelated, but only very few studies examined the association between 25(OH)D and anxiety. This study investigated whether 25(OH)D levels are related to anxiety symptoms in older persons, both cross-sectionally and over time. Methods Data from two samples of a large population-based cohort study were used (sample 1: N = 1259, 64–88 years; sample 2: N = 892, 60–98 years). Anxiety symptoms were measured with the Hospital Anxiety and Depression Scale - Anxiety subscale at baseline and after three years; serum 25(OH)D was measured at baseline. Cross-sectional and longitudinal relationships between 25(OH)D and anxiety were examined using logistic regression analysis, taking into account relevant confounding variables. Results Of the participants, 48.0% (sample 1) and 26.4% (sample 2) had 25(OH)D levels < 50 nmol/L, whereas 8.1% (sample 1) and 6.5% (sample 2) had clinically relevant anxiety symptoms. Cross-sectionally, persons with 25(OH)D < 50 nmol/L experienced more anxiety symptoms than persons with 25(OH)D ≥ 50 nmol/L (sample 1: OR = 1.55; 95% CI: 1.03–2.32, p = 0.035; sample 2: OR = 1.74; 95% CI: 1.03–2.96, p = 0.040). However, after adjustment for demographic and lifestyle variables and depressive symptoms, significant associations were no longer observed (p = 0.25–0.72). Similarly, 25(OH)D levels were not significantly related to anxiety symptoms after three years in both samples. Conclusions After adjustment for confounding, there was no cross-sectional or longitudinal association between 25(OH)D levels and anxiety symptoms, independently from depression, in two large samples of older persons.