Far-infrared Herschel PACS imaging and spectroscopic observations of the nebula around the luminous blue variable (LBV) star AG Car have been obtained along with optical imaging in the Halpha+[NII] filter. In the infrared light, the nebula appears as a clumpy ring shell that extends up to 1.2 pc with an inner radius of 0.4 pc. It coincides with the Halpha nebula, but extends further out. Dust modeling of the nebula was performed and indicates the presence of large grains. The dust mass is estimated to be ~ 0.2 Msun. The infrared spectrum of the nebula consists of forbidden emission lines over a dust continuum. Apart from ionized gas, these lines also indicate the existence of neutral gas in a photodissociation region that surrounds the ionized region. The abundance ratios point towards enrichment by processed material. The total mass of the nebula ejected from the central star amounts to ~ 15 Msun, assuming a dust-to-gas ratio typical of LBVs. The abundances and the mass-loss rate were used to constrain the evolutionary path of the central star and the epoch at which the nebula was ejected, with the help of available evolutionary models. This suggests an ejection during a cool LBV phase for a star of ~ 55 Msun with little rotation.