Electrophysiological signals recorded intracranially show rich frequency content spanning from near-DC to hundreds of hertz. Noninvasive electromagnetic signals measured with electroencephalography (EEG) or magnetoencephalography (MEG) typically contain less signal power in high frequencies than invasive recordings. Particularly, noninvasive detection of gamma-band activity (>30 Hz) is challenging since coherently active source areas are small at such frequencies and the available imaging methods have limited spatial resolution. Compared to EEG and conventional SQUID-based MEG, on-scalp MEG should provide substantially improved spatial resolution, making it an attractive method for detecting gamma-band activity. Using an on-scalp array comprised of eight optically pumped magnetometers (OPMs) and a conventional whole-head SQUID array, we measured responses to a dynamic visual stimulus known to elicit strong gamma-band responses. OPMs had substantially higher signal power than SQUIDs, and had a slightly larger relative gamma-power increase over the baseline. With only eight OPMs, we could obtain gamma-activity source estimates comparable to those of SQUIDs at the group level. Our results show the feasibility of OPMs to measure gamma-band activity. To further facilitate the noninvasive detection of gamma-band activity, the on-scalp OPM arrays should be optimized with respect to sensor noise, the number of sensors and intersensor spacing.