yes (for the gas), and larger than or equal to -|q|/T (or the integral over that quantity if T changes in the process). It is equal to that quantity if the heat is removed reversibly.
Actually, for almost any kind of system, it need not be a gas. The only exception would be systems with negative temperature, which are not very usual.