The term "gunship" is used in several contexts, all sharing the general idea of a light vessel armed with heavy guns.
More recently, a "gunship" has been used to refer to helicopters to which machine-guns and similar weapons systems have been mounted, or a fixed-wing aircraft with heavy guns on board. The etymology of this usage is obvious, since pilots often refer to their aircraft as "ships".
The recent application of the term for military aircraft is more specific, describing a vehicle that is capable of hovering or circling its target instead of performing strafing runs. According to such a definition, the AC-130 Spectre/Spooky or the AH-64 Apache are gunships.