I'm reasonably sure that all of you are familiar with Operation Lifesaver, the program conducted jointly by the US railroads and other organizations & agencies to promote railroad safety, especially at rail crossings. The numbers involving car-train and people-train accidents are staggering and could easily be lowered if people just remembered the simple phrase, "Always expect a train." It is estimated that in the United States, there is a railroad accident involving either a car or a person every three hours!
In the early days of railroading, there wasn't much that was done by either the railroads or the general public to protect the places where roads or paths crossed railroad lines. This was primarily to do the relatively slow speed of trains at that time. But as the speeds increased, the accidents also increased and efforts were made to try to warn the general public about railroad crossings.
One of the first "safety devices" was the simple railroad cross-buck pictured here on the left. These were placed where roads and tracks intersected to try to warn people that trains traveled on the tracks that they were about to cross and that they needed to be careful.
Later, the wig-wag signal came along as pictured on the right. This was an improvement on the standard cross-buck in that a paddle and light "wig-wagged" back and forth when a train was approaching. As speeds of both automobiles and trains increased, crossing gates similar to the ones we know today began to be developed and deployed along the tracks. But in many cases, these were operated manually from gate towers as pictured here.
The higher vantage point allowed the gate operator to see the approaching trains and to lower the gates manually to protect the general public. At more remote or crossings where the rail traffic wasn't as fast, the gate operator often had a simple signalman's shed for protection from the weather. Note the STOP sign & railroad lanterns in the photo below. As technology evolved, the crossing gates became automated and the need for the crossing guard eventually went away.
In spite of all of the safety measures in place today, the accidents involving railroad trains and the general public can be greatly reduced if you simply Stop, Look & Listen when approaching a railroad crossing.