Scanning tunneling microscopy images of ultrathin Gd films on Y(0001) show a strong chemical contrast depending on the tunneling voltage. For small voltages the tunneling spectra for Gd reveal pronounced features which are attributed to occupied and unoccupied electronic surface states as found previously in photoemission experiments. These Gd surface states give rise to a large tunneling current and the image contrast between Gd and Y is enhanced by a factor of two because low-energy surface states are absent in Y. On the other hand, for a high positive bias of + 2 V the contrast is reversed due to tunneling into unoccupied Y electronic states presumably originating from the Y 5 d band. The corresponding current increase with respect to Gd exceeds the current increase induced by a monolayer step.