What does "grating" mean?

Grating: (Optics) A system of close equidistant and parallel lines lines or bars, especially lines ruled on a polished surface, used for producing spectra by diffraction; -- called also diffraction grating.

Additional senses

  1. 2.pl. (Naut.) The strong wooden lattice used to cover a hatch, admitting light and air; also, a movable Lattice used for the flooring of boats.
  2. 3.That grates; making a harsh sound; harsh. -- Grat"ing*ly, adv.
  3. 4.A harsh sound caused by attrition.

Sources