This is a fragment of the guidance system developed by the Germans for the V-2 ballistic missile during World War Two. It contains a gyroscope that could sense the acceleration of the rocket. It integrated that data over time, giving the rocket's velocity. At a predetermined velocity the guidance system sent a signal to cut off the rocket motor, after which the V-2 coasted on a "ballistic" trajectory to its target.
This object is not on display at the National Air and Space Museum. It is either on loan or in storage.