Drag the gradient from the Tools panel or Color panel to the Swatches panel.
In the Swatches panel, click the New Swatch button or select New Swatch from the Swatches panel menu. In the dialog box that appears, enter a swatch name, and click OK. (See Swatch options.)