You will need consent if you intend to erect or maintain a gate across a road, which crosses any line of railway within 40 metres of the middle line of the railway. Roads include streets, rights of way and thoroughfares.
You will also need consent if you intend to erect or maintain a gate in order to enclose the railway at a level crossing with cattle grates.