A search for the Standard Model Higgs boson produced in association with a top-quark pair, ttH, is presented. The analysis uses 20.3 fb-1 of pp collision data at √s = 8 TeV, collected with the ATLAS detector at the Large Hadron Collider during 2012. The search is designed for the H → bb decay mode and uses events containing one or two electrons or muons. In order to improve the sensitivity of the search, events are categorised according to their jet and b-tagged jet multiplicities. A neural network is used to discriminate between signal and background events, the latter being dominated by tt+jets production. In the single-lepton channel, variables calculated using a matrix element method are included as inputs to the neural network to improve discrimination of the irreducible tt+bb background. No significant excess of events above the background expectation is found and an observed (expected) limit of 3.4 (2.2) times the StandardModel cross section is obtained at 95% confidence level. The ratio of the measured ttH signal cross section to the StandardModel expectation is found to be µ = 1.5±1.1 assuming a Higgs boson mass of 125 GeV.