Indeed, and modern dishwashers also often have a cycle which adjusts the amount of washing they do to the load (using things like sensors to see how clean the wastewater is) which can further improve this.
Having lived off-grid without running water, I know very precisely that I use slightly more than a gallon of water to hand wash my dishes. No way a dish-washer beats that.
It comes close on an every other day cycle, and if you waited to run it until filling it, it would probably beat that. (Maybe it goes without saying, but your ~1 gallon figure is extremely efficient for 15 minutes of hand-washing.)
That said, unless you live in a desert, or off-grid, 1-2 gallons of water a day has no real cost. E.g., I pay 0.7 cents/gal for the water and 2 cents/gal for the outgoing sewage.
Dishwashers are much more efficient than you think -- more than handwashing. Just run it every day or two.