Well, the nearest railway station is Aurangabad (AWB), located some 30km (19 miles) south of Ellora.
For Aurangabad check out the Devagiri Express (Train No: 17057 /17058 ) between Mumbai (CSTM) and Secundradad (SC) or Nandigram Express (Train No:11402 ) between Nagpur (NGP) and Mumbai CST via Aurangabad.
Another well connected railway station Jalgaon (JL) is some 150km (93 miles) north of Ellora. There are large number of long distance express trains via Jalgaon.
Onward journey to Ellora Caves from either of the railway stations are by road.
See the Railway Time Table for Trains & Schedules. The schedules are listed as tables based on various routes.
For Aurangabad , see the table 53. For Jalgaon see Tables 2,4,5,6,9.
Route map for Ajanta and Ellora from Aurangabad