Ionization energy is the energy required to lose donate an electron in an atom of an element in its gaseous state while electron affinity is the energy required to gainacquire extra electron by an atom of an element in its gaseous state