The influence of graphene islands on the electronic structure of the Ir(111) surface is investigated. Scanning tunneling spectroscopy (STS) indicates the presence of a two-dimensional electron gas with a binding energy of -160 meV and an effective mass of -0.18me underneath single-layer graphene on the Ir(111) surface. Density functional calculations reveal that the STS features are predominantly due to a holelike surface resonance of the Ir(111) substrate. Nanometer-sized graphene islands act as local gates, which shift and confine the surface resonance.