A loose horse has crashed through a rural railway crossing, sending the broken barrier across the track and into the path of a high-speed train.