Q: "How is f-stop a measure of dynamic range?".
A: One Stop equals 6dB and theoretically can be represented by one bit (though in practice additional bits are necessary, see Link at end of this answer).
No other answer mentions a Unit of Measurement for Dynamic Range, let's define everything in comparable Units so an exact answer can be given.
The decibel (dB) is a logarithmic unit used to express the ratio of two values of a physical quantity.
A change in amplitude ratio by a factor of 2 (equivalently factor of 4 in power change) approximately corresponds to a 6 dB change in level.
The f-number (sometimes called focal ratio, f-ratio, f-stop, or relative aperture) of an Optical System is the ratio of the lens's focal length to the diameter of the entrance pupil. The "F" pertains to Lenses, so f/8 is the "fractional diameter" or Focal Number of the Aperture of an Optical System (Lens, Filter, etc., and not the Sensor, ADC, Bus or Memory width).
A "Stop" will halve or double the amount of light. A Len's F's are in Stops but could be fractional Stops too.
Dynamic range is a term used to describe the ratio between the smallest and largest signals that can be measured by a Data Acquisition System (a Sensor, ADC, Bus, and Memory - specifically, the Bit Width and accuracy), let's call that a Camera (but also applicable to 'Analog' or Film). Analog Electronic Cameras had a Tube that detected light and converted it to a range of voltages that was recorded on a Tape. Both Systems have a theoretical Dynamic Range which can be designed for or calculated, in practice the attained Dynamic Range will be less.
Digital Systems (as opposed to Analog) have a response that is more linear than film, which has characteristics (reciprocity failure) that tend to compress or "bend" the first and last stops. Film's nonlinearity makes it more forgiving of overexposure and permits capturing of shadow details slightly better than video.
This is why Digital Cameras have "Log" or in Sony's case, SLOG; there's fewer Bits for the middle and more available for the highest and lowest values (essentially the 'width' of the Bit is altered).
In Digital Systems the resolution (of the Dynamic Range) of a measurement system (a Digital Camera) is determined by the number of bits that the ADC uses to digitise an input signal (from the Sensor).
Most ADCs have either 8 bit to 24-bit resolution (not used in Digital Cameras). For a 16-bit device the total voltage range is represented by 2^16 (65536) discrete digital values. Therefore the absolute minimum level that a system can measure is represented by 1 bit or 1/65536th of the ADC voltage range. For a system with a voltage range of ±10V then the smallest voltage that the system can distinguish will be:
20 / 65536 = 0.3 mV
In decibels this dynamic range is therefore expressed as:
20 Log10 (65536) = 96dB
Therefore for a 16-bit ADC the dynamic range is 96dB. Using the same calculations the dynamic range of a 24-bit ADC is 144dB.
6 dB = 1 stop = 1 bit.
This is why people say they like 14-Bit RAW, and why you want to avoid an 8-Bit Camera - Dynamic Range.
Additional information added September 19, 2017:
The Website Analog Devices has an interesting Article on ADCs and how the Noise Floor and Headroom subtract from the true number of bits available; while it's an Article that is about Audio rather than Video signals (thus Stops are not applicable) the '1 Bit equals 6 dB Rule' still holds: http://www.analog.com/en/education/education-library/articles/relationship-data-word-size-dynamic-range.html#therelationshipofdynamicrange - the end of that Section contains information supporting my answer but the whole Webpage is an interesting read. Contains additional information on over specifying your equipment to obtain a desired number of reliable bits.