In gmax, you need to link the barrel to the turret. To do this, choose the Select and Link button (normally on the left of the toolbar at the top). Now, click your barrel and drag to the turret, then let go. The turret will flash its bounding box to show you what happened. Now, the barrel is linked to the turret. By linking, you build up a hierarchy of objects. When the parent moves, all children move with it. So now that the barrel is a child of the turret, when the turret moves or turns the barrel turns too.
