Fully automatic operation requires something like photo detectors to sense the train, a circuit to turn on and off the lights, and maybe an alternating flasher for the lights. The Paisley circuit does all of this and is the most reasonably priced module, at least a few years ago when I did this. There is a different circuit that will operate physical crossing gates as well.
I tried to make this work with IR photo diodes, but conflict with ambient room lighting made that impossible.
You could do this manually with a toggle and an alternating flasher, but I really wanted an automatic system, not a manual one.