It's not the (for walkers open) gate between train station Carregado and Vila Nova da Rainha, is it?
I haven't crossed the railway last year and went along the service track. One time I had to get close to the fenced railway line to cross a little river. From the footprints anybody does jump this fence, but that might be the reason that the arrow in Carregado was pointing the opposite direction.
As the you are crossing the river in about 2m distance to the train track, it's not 100% safe but I feel less safe while walking on roads in Portugal with all the crazy car drivers.
Both variants are shown on this map:
https://hiking.waymarkedtrails.org/#?map=15!39.0209!-8.9375