  In this article we study the generalized Hilbert matrix operator $\Gamma_\mu$
acting on the Bergman spaces $A^p$ of the unit disc for $1\leq p<\infty$. In
particular, we characterize the measures $\mu$ for which the operator
$\Gamma_\mu$ is bounded and we provide estimates of its operator norm. Finally,
we also describe when $\Gamma_\mu$ is compact by computing its essential norm.
