Cryo-electron microscopy (cryo-EM) has recently become a premier method for obtaining high-resolution structures of biological macromolecules. However, it is limited to biomolecular samples with low conformational heterogeneity, where all the conformations can be well-sampled at many projection angles. While cryo-EM technically provides single-molecule data for heterogeneous molecules, most existing reconstruction tools cannot extract the full distribution of possible molecular configurations. To overcome these limitations, we build on a prior Bayesian approach and develop an ensemble refinement framework that estimates the ensemble density from a set of cryo-EM particles by reweighting a prior ensemble of conformations, e.g., from molecular dynamics simulations or structure prediction tools. Our work is a general approach to recovering the equilibrium probability density of the biomolecule directly in conformational space from single-molecule data. To validate the framework, we study the extraction of state populations and free energies for a simple toy model and from synthetic cryo-EM images of a simulated protein that explores multiple folded and unfolded conformations.