Ngaire - I did the Delhi/Agra road trip some time ago (long time ago!) and it was exactly 3 hours down, 3 hours back. There is also a train, daily, with First Class service between the two cities but that is also about 3 hours and unless things have changed a lot I would not recommend this since the stations are very hard to negotiate!!
I think for the Taj you really need at least one overnight. It is glorious in the moonlight, and there are a lot of other things to see in Agra too - Red Fort for one.