Empirically, credit booms and financial crises are preceded by swings in the long-run productivity growth trends. To account for this, I develop a model in which banks raise financing from households to invest in long-term projects. Fragile capital structures with deposits that enable runs help banks overcome agency problems and improve external financing. Normally, banks finance themselves with a mix of equity and deposits that maximizes discipline, but ensures that they always remain solvent. When growth prospects become sufficiently strong, however, worsening moral hazard induces banks to rely exclusively on deposits, leading to higher credit, asset prices, and investment. If the anticipated growth fails to materialise, though, the excessive deposit financing leads to a banking crisis. Ex-ante leverage restrictions and ex-post bailouts hurt welfare by stifling investment and destroying discipline, respectively. Regulatory supervision of banks that enhances their transparency and governance can sometimes eliminate crises and improve welfare.