Fast-spiking (FS) cells in the neocortex are interconnected both by inhibitory chemical synapses and by electrical synapses, or gap-junctions. Synchronized firing of FS neurons is important in the generation of gamma oscillations, at frequencies between 30 and 80 Hz. To understand how these synaptic interactions control synchronization, artificial synaptic conductances were injected in FS cells, and the synaptic phase-resetting function (SPRF), describing how the compound synaptic input perturbs the phase of gamma-frequency spiking as a function of the phase at which it is applied, was measured. GABAergic and gap junctional conductances made distinct contributions to the SPRF, which had a surprisingly simple piecewise linear form, with a sharp midcycle break between phase delay and advance. Analysis of the SPRF showed how the intrinsic biophysical properties of FS neurons and their interconnections allow entrainment of firing over a wide gamma frequency band, whose upper and lower frequency limits are controlled by electrical synapses and GABAergic inhibition respectively.