Good for you! I made this choice a couple of years ago and I'm now enjoying being mum to my baby.
Regarding making it work financially, I own my house with a mortgage with relatively low repayments (under £500 pcm). To be honest, this played a big part in giving me the confidence that I could afford it because SMP covers my mortgage, council tax, gas, electricity and water.
You'll receive at least SMP (£640pcm) and possibly more maternity pay than that if your employer offers an enhanced maternity pay package. Then child benefit = £80pcm, and possibly child tax credits depending on what your income will be for the tax years that encompass your maternity leave.
Maternity leave is probably the more affordable phase of doing this as you will be in receipt of maternity pay etc. but with no childcare costs. Once you return to work, unless you have willing grandparents on hand to offer free childcare you'll find that this eats up lots of your earnings.
If I were to return to my job when my maternity leave ends, by the time I pay for childcare (£70 for 12 hours due to a long commute), plus my train fare (£32) I would end up coming away with £14 per day... not viable! So I'm making arrangements to be self employed, but that comes with huge risks attached (no sick pay, no employer contributions to pension etc.)
Babies are fairly cheap to run especially if you can breastfeed, so it really is just a case of managing to pay the bills you pay now.
Of course, a huge consideration is how much you're going to spend on fertility treatment. Your finances may already be hugely dented by the time a baby arrives!
I wouldn't let this put you off but you have to plan for it all.
My failsafe option is that if I get into financial dire straits I can sell my house and move to a cheaper part of the country...