A diesel engines greatest advantage over a gasoline engine is that a Diesel engine use compression to ignite the diesel fuel, while a gasoline engine must use a spark-plug. The difference in Compression means less power is produced from a gasoline engine then a diesel engine for the same amount of fuel.
The biggest problem with a Diesel Engine is its very narrow "power band". This very narrow power ban is not a big problem with trucks and large engines, you just add additional gears, but it is a problem as you make the engine smaller. The Narrow Power band also includes a sharper drop off in power on both the low end and high end of the band. For example, if you need additional torque to get a vehicle out of mud hole (or to Accelerate to pass another car), a small diesel may not be able to do it, while the same size gasoline engine can pull the same size vehicle and load out of the mud hole (or accelerate to pass another car) with ease. In most situation this narrow power band is overcome with increase number of gears and larger engines, but that option declines as you go to smaller engines. When you can not do neither, AN d you want to go to smaller engines to make the car lighter, gasoline engines are better. This is why the US Army kept the 1/4 ton M151 Vietnam Era Jeep for years after the US Army converted to Diesel fuel for its 2 1/2 ton trucks (The main reason the US Army replaced the 1/4 ton M151 with the Humvee was the Humvee was the smallest vehicle you could have with a Diesel engine and an automatic transmission, that had enough power on the low end to pull put of mud, thus you replaced the equivalent of a compact car, the M151 Jeep, with the equivalent of a One ton Truck).
Just a comment that it is HOW the diesel is used in a Diesel Engine, compared to HOW Gasoline is used in a Gasoline Engine that makes the Diesel more efficient, not any increase in actual energy within the type of fuel.
Diesel fuel technically has greater power per volume but not per pound (I.e. Diesel Fuel has a higher density then Gasoline). Yes we buy diesel fuel and gasoline in gallons not pounds, but Diesel's energy advantage over gasoline is at best a 20% greater energy output. For an actual comparison of Diesel Fuel to Gasoline you NOT only have to compare gallon to gallon, but also pound to pound. In a pound to pound ratio, gasoline actually has more power.
More on the inherent fuel efficiency of the Diesel AND its main drawbacks:
http://en.wikipedia.org/wiki/Diesel_engine