We present contemporaneous optical and infrared (IR) photometric observations of the Type IIn SN 1998S covering the period between 11 and 146 d after discovery. The IR data constitute the first ever IR light curves of a Type IIn supernova. We use blackbody and spline fits to the photometry to examine the luminosity evolution. During the first 2–3 months, the luminosity is dominated by the release of shock-deposited energy in the ejecta. After ∼100 d the luminosity is powered mostly by the deposition of radioactive decay energy from 0.15±0.05 M⊙ of 56Ni which was produced in the explosion. We also report the discovery of an astonishingly high IR excess, K−L′=2.5, that was present at day 130. We interpret this as being due to thermal emission from dust grains in the vicinity of the supernova. We argue that to produce such a high IR luminosity so soon after the explosion, the dust must be pre-existing and so is located in the circumstellar medium of the progenitor. The dust could be heated either by the UV/optical flash (IR echo) or by the X-rays from the interaction of the ejecta with the circumstellar material.