Esztergom is easy to reach from Budapest. The most straightforward option is the direct train from Budapest Nyugati station, which takes around 90 minutes and runs several times a day. There is also a bus connection from Budapest's Árpád híd bus terminal, which is sometimes faster depending on the service.
In summer, a pleasant alternative is the Mahart river boat from Budapest, which runs on weekends and holidays along the Danube Bend — arriving by water, with the basilica appearing on the hill ahead of you, is a fittingly dramatic entrance. The journey takes around five hours.
Esztergom sits right on the Slovak border. From the Slovak side, you can cross the Maria Valeria Bridge from Štúrovo and walk or cycle into town — useful if you are coming from Bratislava, which is about 60 km to the northwest.