For dimensions $n \geq 3$, we classify singular solutions to the generalized Liouville equation $(-\Delta)^{n/2} u = e^{nu}$ on $\mathbb{R}^n \setminus \{0\}$ with the finite integral condition $\int_{\mathbb{R}^n} e^{nu} < \infty$ in terms of their behavior at $0$ and $\infty$. These solutions correspond to metrics of constant $Q$-curvature which are singular in the origin. Conversely, we give an optimal existence result for radial solutions. This extends some recent results on solutions with singularities of logarithmic type to allow for singularities of arbitrary order. As a key tool to the existence result, we derive a new weighted Moser--Trudinger inequality for radial functions.