In a particular textbook, the work function of a metal (in the context of the photoelectric effect) is defined as:
the minimum amount of energy necessary to remove a free electron from the surface of the metal
This sounds similar to ionisation energy, which is:
the amount of energy required to remove an electron from an atom or molecule in the gaseous state
These two energies are generally different. For instance, Copper has a work function of about 4.7eV but has a higher ionisation energy of about 746kJ mol-1 or 7.7eV.
I've sort of figured it's because the work function deals with free electrons whilst ionisation is done with a valence electron still bound within the atom. Is the difference due to the energy required to overcome the attraction of the positive nucleus?