According to a knocking control device (20) in a gas engine (1), a controller (21) calculates a knocking occurrence ratio (SEV) that is the ratio of the number of cycles in which a predetermined knocking has occurred during the elapse of a predetermined number of cycles to the predetermined number of cycles. Based on the deviation (?SEV) between an occurrence ratio delay calculation value (SEVAVE) calculated by performing a delay calculation on the knocking occurrence ratio (SEV) and a predetermined occurrence ratio target value (SEVSET), the controller (21) determines a target value of the ignition timing of an ignition device. The controller (21) then controls driving of the ignition device so that the ignition timing follows a command value (IGN) determined according to the target value.