Are they closed or locked? If they are locked, locked=yes can be used, though I haven’t checked if any of the routers respects this tag. If the only way to reach the way behind the gates is through these permanently closed/locked gates, I’d also consider tagging the road itself with access=private as well. But that also depends on local legislation.
Have you tried adding also access=private on the barrier=gate if general public/worshippers/tourists cannot use it? The same on highway=footway section unavailable to general public?
I did not check if they were technically locked or not, but they did not seem like gates you would open, and the others walking up did not try to traverse them either
And it was not really a normal gate, it was two expandable metal gates, and both looked like this (without the wheel house at the right)
it may be a bit tricky - maybe they open during some part of the year or something, but assuming that it applies in general I would add access=private on affected gates and footway.