How does the electrochemical potential within a battery work at the level of basic E&M? 
The explanations that I've seen for how batteries work (like this one) tend to go along these lines:

One electrode "has an electrochemical potential that makes it want to give up electrons" (or really, ionize neutral atoms) and the other "has an electrochemical potential that makes it want to accept electrons" (or really, recombine electrons and ions into neutral atoms). The electrolyte solution that connects the two electrodes allows positive ions to pass through, but not electrons. Before an external circuit is closed, positive ions leave the negative electrode and move through the electrolyte solution onto the positive electrode, leaving both electrodes with a slight net electric charge. These net charges produce an electrostatic field within the battery from the positive to the negative electrode that tends to oppose the motion of ions through the electrolyte solution. This electrostatic field builds up until it cancels the electrochemical potential and the battery reaches an equilibrium.


Once an external circuit is closed, the electrostatic field passing through the wire draws electrons from the negative electrode to the positive electode, slightly reducing the charge imbalance and weakening the internal electric field within the battery. This allows the positive ions to resume flowing through the electrolyte solution, which restores the charge imbalance and the potential difference, which in turn continues to draw electrons through the wire, etc.

To me, this explanation seems to be invoking the "electrochemical potential" as a magic wand that pushes positive ions from the negative to the positive electrode without needing to invoke any electric fields. I'm okay with that for the most part; it's obviously useful to use bulk thermodynamic potentials to simplify the immensely complicated behavior of a many-body system. I'm also okay with treating the electrolyte solution as a black box that magically allows positive ions through while blocking free electrons.
But the thing that I really don't understand about this explanation is the fact that within the electrolyte solution, the electric field always points from the positive to the negative electrode - but when the circuit is closed, the positive ions, and hence the net current, flow from the negative to the positive electrode (because the electrochemical potential "beats" the slightly weakened electric field). This means that the electrical conductivity of the electrolyte solution is actually negative, because the electric field and current point in opposite directions!
This is just very weird to me. At the microscopic level, charges just move in whatever direction the electric field pushes them. (I'm assuming that batteries can be qualitatively explained without invoking either magnetic or quantum effects, although maybe that's not true.) How can this magical stat-mech "electrochemical potential" overcome the basic rules of electrostatics and cause charged ions to move against the electrostatic field, resulting in an electrolyte solution with a negative electrical conductivity? I don't have any intuition for what's going on here at the microscopic level, or for how the positive ions could move through the electrolyte solution in this way. To me, this explanation simply shifts the question from "How do batteries work?" to "How does the electrochemical potential work?".
ETA: I found a paper that addresses exactly this question.
 A: I haven't seen chemistry since high school, so I might be way off, but maybe this analogy works:
Imagine an ideal gas of fixed temperature $T$ in a tall box, except that when molecules hit the top of the box, they are absorbed, moved downward outside the box, and then popped back in at the bottom. The energy that must be spent to do this for each molecule (i.e. to push a molecule back in at the bottom, against the higher gas pressure there) is the analogue of the electrochemical potential. The energy that can be harvested by moving the molecules from top to bottom is the analogue of the electrical energy supplied by the battery.
In the steady state, molecules continually hit the top of the box due to thermal motion, causing a steady "current" to go from top to bottom. In this mechanical battery, the molecules in the box go up against gravity, but there isn't any upward force acting on them, besides what happens randomly in collisions.
The current is purely a statistical mechanical effect. The gas wants to approach the steady state of an exponential density distribution, but we are preventing that by taking molecules out at the top. Gravity is still pulling each individual molecule downward; it's not like anything here has "negative gravitational mass". Similarly, the solutions in batteries don't have negative conductivity, because $\mathbf{J} = \sigma \mathbf{E}$ holds in equilibrium, and drawing the current explicitly takes us out of equilibrium.
A: 
within the electrolyte solution, the electric field always points from the positive to the negative electrode - but when the circuit is closed, the positive ions, and hence the net current, flow from the negative to the positive electrode

The issue you are running into is just a misunderstanding about this part. The electrolyte is approximately* an equipotential surface. The ions move through the electrolyte subject to Ohm’s law and standard diffusion and chemical transport laws.
The change in voltage which goes in the opposite sense of Ohm’s law is localized near the surface of the electrode. It is only in this region that the electrochemical reaction moves current up the voltage gradient.
$ * $ the electrolyte is a decent conductor with a very large cross section, so the resistance is low, but it does have some internal resistance which contributes to the battery’s overall internal resistance and prevents it from being exactly equipotential
