The topological classification of gerbes, as principal bundles with the structure group the projective unitary group of a complex Hilbert space, over a topological space $H$ is given by the third cohomology $text{H}^3(H, Bbb Z)$. When $H$ is a topological group the integral cohomology is often related to a locally continuous (or in the case of a Lie group, locally smooth) third group cohomology of $H$. We shall study in more detail this relation in the case of a group extension $1to N to G to H to 1$ when the gerbe is defined by an abelian extension $1to A to hat N to N to 1$ of $N$. In particular, when $text{H}_s^1(N,A)$ vanishes we shall construct a transgression map $text{H}^2_s(N, A) to text{H}^3_s(H, A^N)$, where $A^N$ is the subgroup of $N$-invariants in $A$ and the subscript $s$ denotes the locally smooth cohomology. Examples of this relation appear in gauge theory which are discussed in the paper.