The embedded contact homology (ECH) of a 3-manifold Y is a topological invariant defined using a contact form on Y which counts certain pseudoholomorphic curves in its symplectization. We compute the ECH of nontrivial circle bundles over Riemann surfaces.