The term Pagan referred to certain ancient Vulcan beliefs, as well as to persons adhering to those beliefs.

According to Sybok, as of 2287, modern dogma incorrectly considered Sha Ka Ree a myth concocted by Pagans. (Star Trek V: The Final Frontier)

The Rumarie was an ancient Pagan festival, that as of the late 24th century had not been observed for a millennium. (VOY: "Meld")

Pagans of course in reality also exist on Earth, but in Star Trek they were only ever mentioned in Vulcan contexts.