Work function and ionization energy
They differ by definition, which states that work function is difference in energy between Fermi level (work required to add one electron to the body) and vacuum level (energy of an electron that drifts in vacuum, free from any material), while ionization energy is difference in energy between HOMO (highest occupied molecular orbital) and our old friend, vacuum level. 

It's clear that electrons that occupy orbitals (HOMO energy level) are lower in energy than Fermi level (the boundary between occupied and unoccupied states in a continuum of states). Below is the picture which you might find useful. Also check for the source of picture: it has good and detailed explanation about your next possible questions on topic. 



[source]: Antoine Kahn. Fermi level, work function and vacuum level. DOI: 10.1039/C5MH00160A (Focus) Mater. Horiz., 2016, 3, 7-10.