ABSTRACT We develop statistical methods within a Bayesian framework to infer the star formation history from photometric surveys of pre-main-sequence populations. Our procedures include correcting for biases due to extinction in magnitude-limited surveys, and using distributions from subsets of stars with individual extinction measurements. We also make modest corrections for unresolved binaries. We apply our methods to samples of populations with Gaia photometry in the Orion A molecular cloud. Using two well-established sets of evolutionary tracks, we find that, although our sample is incomplete at youngest ages due to extinction, star formation has proceeded in Orion A at a relatively constant rate between ages of about 0.3 and 5 Myr, in contrast to other studies suggesting multiple epochs of star formation. Similar results are obtained for a set of tracks that attempt to take the effects of strong magnetic fields into account. We also find no evidence for a well-constrained ‘birthline’ that would result from low-mass stars appearing first along the deuterium-burning main sequence, especially using the magnetic evolutionary tracks. While our methods have been developed to deal with Gaia data, they may be useful for analysing other photometric surveys of star-forming regions.