Model train crossing signals

You do know the Arduino GND is connected to earth ground when you use a PC USB connector ?

Yes you can connect the Arduino GND to the track power supply GND (which is DC).

I suggest you use either an NPN transistor CE switch to the third track OR an optoisolator then to the Arduino input.

Looks like fun !