Also known as a drydock. This is a dock which can hold a ship
steady while the water is pumped out, for the purpose of inspecting,
cleaning, or repairing the outside portion of the hull which is normally
submerged.
Such cleaning is much more thorough than your ordinary scraping
of barnacles, which is a routine procedure done with the
ship in the water. Such cleaning can involve burning off the accumulated
sea gunk. (grave is an old word meaning to clean the
underside of a ship and apply tar to make it watertight.)
A graving dock is also where a ship is built. Some docks are constructed
with such care that laser sights and other esoterica are used to ensure
a perfectly flat platform on which to base the keel. (Though I haven't
been able to find out why that is so necessary.)