The purpose of this review is to describe in some detail the mathematical relationship between geometrodynamics and connection dynamics in the context of the classical theories of 2+1 and 3+1 gravity. We analyze the standard Einstein-Hilbert theory (in any spacetime dimension), the Palatini and Chern-Simons theories in 2+1 dimensions, and the Palatini and self-dual theories in 3+1 dimensions. We also couple varions matter fields to these theories and briefly describe a pure spin-connection formulation of 3+1 gravity. We derive the Euler-Lagrange equations of motion from an action principle and perform a Legendre transform to obtain a Hamiltonian formulation of each theory. Since constraints are present in all these theories, we construct constraint functions and analyze their Poisson bracket algebra. We demonstrate, whenever possible, equivalences between the theories.