What is the danger of reversing the polarity while connecting a dishwasher to the electrical service?
Reversing "polarity"* (swapping the hot and grounded/neutral wires) presents no danger to the equipment on an AC circuit. In terms of electrical properties, the conductors are the same. The current switches direction 50 or 60 times each second, and the equipment simply cannot tell the difference between the two conductors. Here's an interesting article in the Electrical Engineering Times about neutral wire myths.

Safety to humans is a different matter. In most of the world, common household current is single phase power, with a “hot” conductor carrying line current, and a grounded “neutral” conductor carrying the return current (120V in North America, 230V in Europe, 100V in Japan, etc.). In North America, the single phase is actually 240V split into two 120V legs, and there is no neutral if you use 240V, but let’s sort of ignore that for now.

The hot/line conductor is dangerous if you touch it, while the grounded neutral is normally safe.

If a device or appliance uses a single-pole on/off switch, so it only breaks one conductor, then it’s dangerous to switch the neutral. If you switch the hot conductor, it de-energizes all the wiring in the appliance. However; if you switch the neutral, it leaves all of the wiring in the appliance energized. If you touch it, or if there’s a fault and you touch the appliance housing, you could be electrocuted even if the appliance's power switch is off.

If an appliance has a two-pole on/off switch, then it will break both conductors at the same time. Consequently, no matter which order you connect  the wires in, throwing the switch off will completely de-energize the appliance.

* Polarity: this term is not terribly accurate. It's "polarity" in the sense that the hot conductor on a hot/neutral circuit is connected to one pole or the other of the smaller coil in the transformer outside (the neutral is connected to the center of the coil, not to either pole). But there's no such thing as a correct direction for current to flow on an AC circuit, since AC current changes direction constantly. So this is not like the positive/negative polarity of DC current from a battery.