As Trains Go By is the first track on Judith Hill’s debut album Back In Time, which was first made available as a free download on 23 March 2015. The song is credited to Judith Hill on the album but she revealed in 2018 that it was actually co-written with Prince during the recording of her album. Prince also appears as a producer and musician on the track.
While specific recording dates are not known, it is assumed to have been recorded in January 2015, at Paisley Park Studios in Chanhassen, Minnesota. The track uses a horn line borrowed from Xpand during the horn section.
A live take (in studio) of the song recorded by Judith Hill and her band in 2019 was included on her album Studio Live Session .