It was the same episode. IIRC, it was set on a planet where the Roman Empire still existed into the 20th century. It's the only time I can remember where religion was ever even mentioned on a Star Trek series, although I didn't see all of DS9 or Voyager and almost none of Enterprise so I might be mistaken.
DS9 had a lot of religious references. The whole ‘Emissary of the Prophets’ storyline.
The other series were pretty devoid of religion though. Well I didn’t see much of Voyager, but I know Enterprise really didn’t talk about it much, except maybe some of the Vulcan philosophy.