Mr Ryall's spokeswoman said the inpatient beds for the severely ill would number around four.
The minister said he had heeded expert advice that "supporting mothers and babies together at this critical early stage not only has an immediate positive impact upon their mental health and wellbeing, but also helps prevent potential future mental health issues for the baby".
"This will allow [mothers] to bond with their infants and develop their parenting skills while at the same time receiving treatment for their mental illness, closer to home."
At present, mothers in Auckland needing admission to an acute mental health unit must be separated from their baby, which can cause problems for attachment, breast feeding and the duration of inpatient treatment. The only facility where the baby can be with its mother is a small respite service. Christchurch has an acute mother-and-baby unit that serves the South Island.
A woman who suffered post-natal psychosis following the birth of her son in Auckland more than two decades ago and who was separated from him for treatment said it was "incredible - that's amazing", that a mother-and-baby unit was at last to be established.
She said Auckland's lack of such a facility might have contributed to the problems she had observed in the children of several women who had suffered from post-natal psychosis.
David Hughes, a clinical adviser to Northland's and Auckland's district health boards, said the DHBs hadn't yet decided on the four-bed acute unit and some treatment could be provided in packages of care at home or in hospital, depending where the patients were located when they became unwell.
"One of the options has been to look at mothers staying on at the maternity wards ... maybe a day or two or three longer for mothers who were showing early warning signs or developing post-natal distress or depression."
Maternity Services Consumer Council co-ordinator Lynda Williams welcomed the announcement of a mother-and-baby unit.
"It's good news," she said. "It's been a long time coming. It's something women's groups in Auckland have been lobbying for for 15 to 20 years."
But she said it was vital the voice of consumer groups involved in maternal mental health be heard in the planning of the services.