I took an auto rickshaw from Gaya station to Bodh Gaya which cost Rs100 which wasn't bad considering it took us about 30 minutes. Gaya is a pretty poor town and you pass by a lot of poverty on the way out of the city. I don't think you should really stop here for long. I took an auto rickshaw back to the station early in the morning in order to catch the early Rajdhani train to Calcutta. This cost me more (Rs200) because it was 3.45am!
The nearest train station is in Gaya and the line connects with Varanasi and Calcutta. I took a train from Varanasi to Gaya which arrived late and so had to spend a night in Gaya (which isn't the best place in the world). I left Gaya on a very early Rajdhani train (No. 2302) which left at 4.30am! Most of the trains leave late at night so it this might be a better option. There is a railway reservation office inside the Tourist Information Office which is located on the corner of Temple St and Bodh Gaya Rd.
This is a very good travel agency that you may try to get the help.
Two appraisal I got from here:
You are very lucky (because he rushed to the booking office by riding the motorbike before the closing time and got me the ticket.)
You have a very nice smile *_*