We observed the far-IR fine-structure lines of 26 Seyfert galaxies with the Herschel-PACS spectrometer. These observations are complemented with Spitzer Infrared Spectrograph and Herschel SPIRE spectroscopy. We used the ionic lines to determine electron densities in the ionized gas and the [C I] lines, observed with SPIRE, to measure the neutral gas densities, while the [O I] lines measure the gas temperature, at densities below ∼104 cm-3. Using the [O I]145 μm/63 μm and [S III]33/18 μm line ratios, we find an anti-correlation of the temperature with the gas density. Various fine-structure line ratios show density stratifications in these active galaxies. On average, electron densities increase with the ionization potential of the ions. The infrared lines arise partly in the narrow line region, photoionized by the active galactic nucleus (AGN), partly in H II regions photoionized by hot stars, and partly in photo-dissociated regions. We attempt to separate the contributions to the line emission produced in these different regions by comparing our observed emission line ratios to theoretical values. In particular, we tried to separate the contribution of AGNs and star formation by using a combination of Spitzer and Herschel lines, and we found that besides the well-known mid-IR line ratios, the line ratio of [O III]88 μm/[O IV]26 μm can reliably discriminate the two emission regions, while the far-IR line ratio of [C II]157 μm/[O I]63 μm is only able to mildly separate the two regimes. By comparing the observed [C II]157 μm/[N II]205 μm ratio with photoionization models, we also found that most of the [C II] emission in the galaxies we examined is due to photodissociation regions.