Optical time domain reflectometry (OTDR) is one of the most successful diagnostic tools for nondestructive attenuation measurement of a fiber link. To achieve better sensitivity, spatial resolution, and avoid dead-zone in conversional OTDR, a single-photon detector has been introduced to form the photon-counting OTDR (-OTDR). We have proposed a -OTDR system using a gigahertz sinusoidally gated InGaAs/InP single-photon avalanche detector (SPAD). Benefiting from the superior performance of a sinusoidal gated SPAD on dark count probability, gating frequency, and gate duration, our -OTDR system has achieved a dynamic range (DR) of 33.4 dB with probe pulse width after an equivalent measurement time of 51 s. This obtainable DR corresponds to a sensing length over 150 km. Our system has also obtained a spatial resolution of 5 cm at the end of a 5-km standard single-mode fiber. By employing a sinusoidal gating technique, we have improved the -OTDR spatial resolution and significantly reduced the measurement time.