All cooktops, gas and otherwise, need a minimum of 1 1/2 inches of clearance from the closest adjacent sidewall. Additionally, they need 30 inches of clearance below the underside of a cabinet. Below the cooktop, there is no need for any clearance.
If the gas stove sits beneath an over-the-range microwave, there must be at least 66 inches of height between the floor and the top of the microwave. This allows at least 13 to 16 inches between the cooktop and the front bottom of the microwave. However, if the cooktop or range has a rating of more than 60,000 British thermal units, a microwave should not be installed over it at all.