Agra Fort Railway Station (AF) is the closest—about 4 km (2.5 mi) from the Taj Mahal. It's a major stop on the Delhi–Chennai and Delhi–Mumbai lines.
From any station: auto-rickshaw, cycle-rickshaw, taxi, or app-based cab (10–20 min). Pre-paid booths at Agra Cantt avoid haggling. The Taj's east and west gates have dedicated parking/drop-off zones.
Take the Gatimaan Express (India's fastest train) from Delhi Hazrat Nizamuddin to Agra Cantt (1 hr 40 min). Arrive early (sunrise entry at 6 AM) for the best light and smallest crowds.