Heavy rain and strong winds are forecast from Friday through to Monday, and Arriva Trains Wales said its network could be affected.
Routes currently at most risk of closure are Llandudno Junction to Blaenau Ffestiniog, and Shrewsbury to Machynlleth.
It comes as part of the A490 in Powys has been closed due to flooding.
The road is shut in both directions between A458/A483 at Sarn y Bryn Caled roundabout, Welshpool, and the B4388 at Kingswood.
Network Rail will also be imposing speed restrictions on trains operating over the weekend between Llandudno Junction and Holyhead.
Arriva Trains Wales said it would replace trains with buses if rail routes do close.
There are currently two flood warnings in place across Wales and nine flood alerts, while a yellow 'be aware' warning issued for parts of north Wales remains in place until 21:00 GMT on Thursday.
Check if this is affecting your journey
Rail commuters have been warned routes could close at short notice over the weekend due to potential flooding.