This is a good question; one way to answer it is to use the Method of Images.
Consider an infinite conducting, charged plane (which is what any conductor looks like up close), and a point charge of the same sign, near the plane. The point charge induces an additional, opposite charge on the conducting plane, which can be modeled by considering a fictional "mirror-image" of the charge, sitting the same distance away, but on the other side of the conductor.
The repulsive force of the infinite plane is constant, but the attraction between the point charge and its image goes as 1/r^2. Therefore, no matter how strong the repulsion is between the charge and the plane, there is some distance r within which the attraction between the charge and its image is stronger. Call this distance D.
Therefore, to fully remove an electron from a conducting surface, it must be removed at least a distance D, or it will actually be attracted back to the surface! To remove the charge a distance D against this attractive force requires some energy; calculation will show that this energy is equal to the "work function" of the material in question (the same work function used to calculate the photoelectric effect, where electrons are knocked out of a metal by energetic photons).