Structures and energies of stoichiometric $\ensuremath{\Sigma}$3(111)[$\overline{1}$10], $\ensuremath{\Sigma}$3(112)[$\overline{1}$10], $\ensuremath{\Sigma}$5(201)[010], and $\ensuremath{\Sigma}$5(301)[010] symmetrical tilt grain boundaries are determined in the tetragonal ferroelectric PbTiO${}_{3}$ using a combination of first-principles electronic-structure calculations and atomistic shell-model-potential simulations. The focus is on grain boundaries, which are ferroelectric domain walls at the same time. A main result is that it is energetically preferential for a 180${}^{\ifmmode^\circ\else\textdegree\fi{}}$ domain wall to reside in the region of a $\ensuremath{\Sigma}$5 grain boundary. This is interpreted as a more general mechanism for domain-wall pinning in polycrystalline ferroelectric materials.