Weapon is a generic term for anything from a pointy stick to a thermonuclear device.
Pamphlet-headed instructors throw their teddies around if a squaddie refers to his weapon as a shooter/firestick/gat/bondhook/iron/bangstick. (Rifle is usually acceptable however).
Use of the term gun is confined to a machine gun or a large green thing which makes a very loud bang and ploughs up half a field at the dangerous end (usually the half of the field where you are sitting rather than where the enemy is sitting).
NB The LSW (Light Support Weapon) does not contain the word 'gun'. This is presumably because it had a problem with doing machine-gunny things like firing several rounds consecutively.
Newer weapons are usually called weapons systems. This is probably to allow them to command a premium price in the arms trade. It also means that the weapon has all sorts of extra dangly bits - these are provided for the squaddie to break and to allow the vendor to make extra sales of spares at exorbitant prices.