I'm worried because at the dentist I went to recently they told me 'you have periodontitis.'

Literal

Recently went dentist [at-で] 'periodontitis [subject-が] exist [confirmatory-ね]' [quotative-と] was-told, am-troubled.

A dental-worry anecdote. The quoted dentist's line uses the sentence-final ね to deliver news as a soft observation — typical of medical professionals giving a diagnosis. The outer frame is a passive reporting construction: ~と言われ ('was told X') with 言われ the 連用形 (stem-linking form) of the passive 言われる. 悩む means 'to be troubled, to worry, to agonize over,' stronger than 心配する. The whole sentence stitches together two events (being told by the dentist, being worried) with the 連用形, a more written-sounding linking style than the て-form.