Layered GaS nanosheets have been attracting increasing research interests due to their highly anisotropic structural, electrical, optical, and mechanical properties, which are useful for many applications. However, single-layer or few-layer GaS-based photodetectors have been rarely reported. Here a few-layer GaS two-terminal photodetector with a fast and stable response has been fabricated. It shows different photo-responses in various gas environments. A higher photo-response (64.43 A W(-1)) and external quantum efficiency (EQE) (12,621%) is obtained in ammonia (NH3) than in air or oxygen (O2). A theoretical investigation shows that the charge transfer between the adsorbed gas molecules and the photodetector leads to the different photo-responses.