In this paper, we report on SwissSPAD2, an image sensor with 512 x 512 photon-counting pixels, each comprising a single-photon avalanche diode (SPAD), a 1-b memory, and a gating mechanism capable of turning the SPAD ON and OFF, with a skew of 250 and 344 ps, respectively, for a minimum duration of 5.75 ns. The sensor is designed to achieve a frame rate of up to 97 700 binary frames per second and sub-40 ps gate shifts. By synchronizing it with a pulsed laser and using multiple successive overlapping gates, one can reconstruct a molecule's fluorescent response with picosecond temporal resolution. Thanks to the sensor's number of pixels (the largest to date) and the fully integrated gated operation, SwissSPAD2 enables widefield fluorescence lifetime imaging microscopy with an all-solid-state solution and at relatively high frame rates. This was demonstrated with preliminary results on organic dyes and semiconductor quantum dots using both decay fitting and phasor analysis. Furthermore, pixels with an exceptionally low dark count rate and high photon detection probability enable uniform and high-quality imaging of biologically relevant fluorescent samples stained with multiple dyes. While future versions will feature the addition of microlenses and optimize firmware speed, our results open the way for low-cost alternatives to commercially available scientific time-resolved imagers.