What's the difference between the work function and ionisation energy?
There is definitely a relationship between the work function and ionisation energy of the elements. See the above figure in which I plotted the work functions (blue) and ionisation energies (yellow) of the elements named in the table of the former answer.
If you plot them against each other, it shows an definite, though loose, relationship. I bet there really is a relation between the two, but I do not know exactly what it is and why it exists.
On first reading they do sound similiar, but they are entirely independent energies and concepts.
The work function of a metal refers to the minimum energy required to release an electron from the surface of a metal by a photon of light. The work function will vary from metal to metal. You might have a read of these: Compton Effect, this previous answer, Work function 1 and this Wikipedia article Work Function 2.
The Ionization energy is the energy needed to release electrons from their bound states around atoms, it will vary with each particular atom, with one outer electron around that atom needing less energy to release it than a lower, more closely bound electron, which requires greater energy because of the greater electrostatic force holding it closer to the nucleus.
Also, to complicate things, you need to allow for the Shielding Effect of Inner Electrons
Periodic trends for ionization energy (IE) vs. proton number: note that within each of the seven periods the IE (colored circles) of an element begins at a minimum for the first column of the Periodic table (the alkali metals), and progresses to a maximum for the last column (the noble gases) which are indicated by vertical lines and labelled with a noble gas element symbol, and which also serve as lines dividing the 7 periods. Note that the maximum ionization energy for each row diminishes as one progresses from row 1 to row 7 in a given column, due to the increasing distance of the outer electron shell from the nucleus as inner shells are added.