How does the state of iodine affect its HOMO–LUMO gap?
I will broadly mention several mechanisms that may influence color of a solid vs. gas, not just the HOMO-LUMO transition.
Without going into the literature and/or performing (extensive) calculations, I cannot confirm or reject your teacher explanation.


In the solid state, you may find intermolecular MO interactions that will affect orbital energies. Depending on the strength, you may even have to abandon the concept of molecular orbitals in favor of crystal orbitals. Quantum dots and their dependence of color on size are somewhat of an example.
Molecules may alter their shape in solid state compared to gaseous state. This is less of an issue in $\ce{I2}$.
In the solid state, intermolecular excitations are more likely (i.e. going beyond HOMO-LUMO transitions). This is especially true if you do not have a pure substance, think doped solids.
Note that supermicroscopic spatial distribution of a substance will have influence on the color as well: finely distributed silver or mercury (as in calomel) may appear as black rather than shiny.