Automatic railway gate control system with signals