You may have heard the phrase, "opposites attract", possibly in reference to interpersonal relationships. That phrase originated in the early days of experimenting with electricity. It was discovered that electric charges come in two varieties called positive and negative. When a positively charged object was brought into the vicinity of a negatively charged object there was a force that tended to pull the objects together. If the two objects both carried the same charge, the force tended to push the objects apart. Now, getting back to the bat and ball, clearly there is a powerful interaction between these two objects. My claim is that it is this same electrical force at work.
The bat and ball are made up of atoms with a positively charged nucleus and a negatively charged cloud of electrons around the outside. Until the ball and bat are very close to each other, the positive and negative charges of the ball atoms are not distinguishable by the atoms of the bat. The ball and bat appear electrically neutral to one another. Only when the distance between ball and bat gets to be about the same as the distance from the negative charges to the positive charges in the atoms, do the ball and bat become "aware" of each other. At that point the negative bat electrons are beginning to feel a repelling force from the negative ball electrons since the electron clouds are closer to each other than to the neutralizing positive charge of the nucleus. The bat and ball are both somewhat squishy so the atoms near the point of contact are pushed back, allowing more atoms to become involved in this collision. Eventually the sum of all the electronic forces between bat and ball is enough to turn the ball around and send it over the fence.
In fact all solid matter in the universe is surrounded by a close fitting electrical force field that tends to exclude other matter from penetrating its space.