Generally speaking, on average (IMHO — an essential qualifier) one is going to be better off with a gasoline pressure washer over electric as the electric models — especially any intended to be powered off a common 15A 120VAC socket — are severely limited both in terms of their working pressure and, especially, in terms of how much water they can deliver at their operating pressure due to the very limited horsepower available from a 120VAC wall outlet (at best, you can get about 2-1/2HP out of a 15A circuit). When it comes to pressure washers you can think of the pressure in terms of just how tough a stain or dirt it can remove (some tasks can be quite demanding) and the volume of water more or less determines just how quickly you can get a given job done. So a more powerful pressure washer (more PSI and more GPM) can both tackle much tougher stains and ground in dirt, etc., and at the same time does more work in much less time —even more so for lighter jobs where you need less cleaning pressure and can thus get away with using a wider angle tip further reducing the time spent cleaning.
The one exception where I would argue that electric is a potentially better option for some is when it comes to washing vehicles or cleaning wood surfaces — the fact that electric pressure washers have a lot less pressure to work with, as well as less total flow, means you are much less likely to damage a vehicle or gouge a wood surface if you get too aggressive, or at least it will take much longer to do so, which can be an easy mistake to make if unfamiliar with pressure washing and using a much more powerful gasoline powered pressure washer. They electrics also have the benefit of less maintenance since there is no engine, and are also less expensive as a result as you can’t get much simpler than strapping a motor onto a pump, but they are also much more limited in the jobs they can tackle and the jobs typically take significantly longer — such are the pros and cons one has to weigh when making the decision which way to go. As with most things, there is no universal right answer — the absolute ideal answer could well be “both”, though it would be nice if there were more (affordable) 240V options as a 240V 30A circuit could power an electric pressure washer much more on par with the consumer grade gasoline options.