Symmetry-protected topological phases (SPTs) have universal degeneracies in the entanglement spectrum in one dimension. Here we formulate this phenomenon in the framework of symmetry-resolved entanglement (SRE) using cohomology theory. We develop a general approach to compute entanglement measures of SPTs in any dimension and specifically SRE via a discrete path integral on multisheet Riemann surfaces with generalized defects. The resulting path integral is expressed in terms of group cocycles describing the topological actions of SPTs. Their cohomology classification allows us to identify universal entanglement properties. Specifically, we demonstrate an equiblock decomposition of the reduced density matrix into symmetry sectors, for all one-dimensional topological phases protected by finite Abelian unitary symmetries.