The drivers of the train and the road roller were seriously injured in the mishap that occurred at Talakallu, about 20 km from here, South Western Railway spokesman Satish said.
Five coaches including three parcel carriages derailed and the mishap disrupted rail traffic on the Guntakal section.
Twentyfive passengers who suffered minor injuries were given treatment at the spot itself.
While the driver of the road roller has been rushed to a hospital in Koppal, the train driver was shifted to a Hubli hospital, Satish said.
The railways arranged buses to transport stranded passengers.