Layman's explaination -
My Chevy pickup has a Duramax diesel, ad about 600 ft/lb of torque, and about 310 Hp. The 6.0 gas engine has about 380 ft/lb, and but also about 310 Hp. I used to have the truck with the gas engine too.
When pulling a HEAVY load, the diesel's torque gets the vehicle accelerated much quicker than does the gas engine. However, going up a grade, once the max speed is reached, they will both do about the same mph with the similar load - figure, pulling about a 10k lb trailer.
So the torque gets you accelerated, but the Hp keeps you going up the grade.