Yes, that's fine. I would rephrase a bit, though: By the time I reached the station, the train had gone. By the time I reached the station, the train was gone.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.