That was a good video. My father and grandfather told me it was a simple closed circuit by a train jumpering across one rail from another. But nowadays it's more techy than that. My father was an electrician by trade and my grandfather had told me that as a young boy, he and his friends were juvenile delinquents growing up in the streets of San Francisco. They would place a metal bar across a streetcar track on purpose to hold up crossing traffic. My father said those metal boxes at RR crossings were called "relay" boxes. Being a navy electrician's mate and a household electrician, but never a RR worker, he assumed RR signaling was relay controlled. I had been fascinated by how trains worked since early boyhood. I thought a RR junction switch was a thing of magic when I was small. At age nine, I read a book from the school library about railroading. It told about classification yards and retarders to control rolling and sorted freight cars. There was a diagram of a carbody locomotive with a toilet actually at the rear of the loco. There were also two diesel motors in the cutaway drawing. Which streamlined d/e loco before 1975 had double diesel power plants and a rear toilet?
I used to ride SP/Caltrain along the SF peninsula during the 1970's through 1990's. I would wonder how the smart grade crossing signals nearby would shut off when the train stopped at the station and how they started again at the time the train was to get rolling again. I believe I saw a conductor with some TV clicker-like device in his hands to control the crossing.
Your father and grandfather are both correct. The trolley system probably used a simple short-circuit type switch since that's all that was required for them at the time. There is something mentioned in an old electrical engineering book that belonged to my great grandfather on that. The book also showed how the switches worked including switching the power to another line above. There are actually small switches up on the wires to do that too in some instances.
As you said, things have gotten more complex over the years. The boxes next to crossings and for the signals are in fact relay cabinets. Depending upon how complex things are, there can be racks upon racks of relays in there. Today, many of these old mechanical relays are being replaced with digital circuit boards that do the same thing. The maintenance is a lot less since the boards can be pulled and replaced easily and brought back to the shop for repair or return to the manufacturer for repair.
On the 1984 NMRA tour in Boston, we got to visit Conrail's Selkirk yard out near Albany, NY. During the tour, I saw racks upon racks of circuits for various things including those for the relay cabinets to be used for replacements. We were told that the boards that are bad are sent back to the manufacturers on an ongoing basis when they got enough of them to make up a shipment. When I saw that, I said I could probably fix those boards if I had a jig and schematics. The manager giving us the tour looked at me and his eyes lit up. Seriously, I was an electronics tech back then, even traveled to Chicago to do a field service call at Walgreens and got a trip to Taipei too to setup a pilot run of new products. When I said that, I was offered a job on the spot to work for Conrail, but I declined rather foolishly. The company I worked laid nearly everyone off including myself 3 years later and went out of business a short time later.
It is possible that the conductor used a radio controller to control the crossings from the train. I've seen that before and if you look closely near the crossings, you'll sometimes see an antenna as well. Today, that's most likely done via signals sent to the circuits through the tracks. The controllers, being digital today, can receive specific codes, not much different than what we use for DCC in locomotives. A specific code can activate or deactivate the crossings. A number of years ago, I saw the engineer in the cab car of one of the commuter trains do that. He pressed a switch on his console and the gates came up while he sat there at the station.