Many industrial and scientific applications, ranging from 3D imaging (such as LIDAR, surveillance, object tracking) to Time Correlated Single Photon Counting (TCSPC), require the ability to perform time-resolved detection of weak light signals, down to single-photon level. Single-Photon Avalanche Diodes are solid-state detectors capable of single-photon sensitivity in the visible and near-infrared wavelength regions and compatible with standard silicon processes. This demand driven the development of low cost, large size CMOS SPAD imagers. In this work we present the design and characterization of a time-gated 32x32 SPAD image sensor fabricated in a 0.16 μm BCD (Bipolar-CMOS-DMOS) technology. The sensor is based on an innovative 16x16 macropixel structure, each composed by four SPADs with independent sensing front-end and event counters, plus a shared Timeto-Digital Converter (TDC). This approach enables higher fill-factor (9.6% with a pixel pitch of 100 μm) by sharing the costly (in terms of area) TDC resource, as well as reduced power dissipation. The imager provides simultaneous photon-timing and photon-counting data and features a 12 bit, 75 ps bin width TDC, which can perform one conversion per each gate window, with up to 62 windows per data readout frame. Two main operation modes are available: a single-photon mode, where an arbitration circuit within the macropixel is used to share the TDC among the 4 SPADs, but with no loss of X-Y resolution (i.e. keeping information about the triggered SPAD); and a two-photon-coincidence mode, where the TDC performs a conversion only if two SPADs of the macropixel are triggered within a preset coincidence window. Lastly, the sensor features multiple readout modes, with varying amount of output data, in order to fit different end-user applications. The imager is capable of 100 kfps (frames per second) in full readout mode, and up to 400 kfps in a reduced data set mode.