The Gravity Probe B (GP-B) gyroscope, a unique cryogenically operated mechanical sensor, was used on-orbit to independently test two predictions of general relativity (GR). Here, we describe the development and performance of the GP-B gyroscope, its geometry and fabrication, spin-up and vacuum approach, magnetic considerations, and static charge management. The history of electrically suspended gyroscopes puts the current work in context. Fabrication and ground testing of the GP-B gyroscope are detailed, followed by a review of on-orbit initialization, calibration, operation, and performance. We find that the performance was degraded relative to the mission goals, but was still sufficient to provide excellent new tests of GR. The degradation is partially due to the existence of gyroscope torques due to an unanticipated interaction between patch potentials on the rotor and the housing. We discuss these patch potentials and describe the effect of related torques on gyro drift. It was essential to include models for the effects due to the patch potentials in the complete data analysis model to yield determinations of the two GR effects.