Josephine Majani delivered her baby on the floor of Bungoma District Hospital in 2013 because all the beds were occupied.
When nurses found her lying on the ground, she said she was slapped and insulted for dirtying the hospital floor.
Bungoma High Court Judge Abida Aroni said the hospital had violated her right to health and dignity, adding that the authorities have failed to dedicate adequate resources for maternal healthcare across the country.
"I was neglected, abused, and shamed during my time at Bungoma District Hospital," said Majani in a statement.
"I'm hopeful that the court's judgment today will force the government to do the right thing and ensure that all women can get the maternal healthcare they need with respect and dignity."
Kenya is one of the world's 10 most dangerous countries for a woman to give birth, with 488 women dying of pregnancy-related causes per 100,000 live births, says the United Nations.
About 8,000 Kenyan women die from pregnancy-related complications each year, largely due to a lack of funding for maternal health, inadequate training and supervision of health workers, negligence and unethical practices, it says.