The Equal Pay Amendment Bill provides a process for sectors with a female-dominated workforce to negotiate for pay rises in line with what men are paid in comparable male-dominated workforces.
The bill was triggered by a claim that went to the Supreme Court in 2014, successfully arguing that aged-care workers were underpaid because they were mostly women.
The new law brings employers, staff and unions to the table to negotiate fair pay, making court action the last resort rather than the first step.
It was unanimously passed into law at 11.59pm overnight. A group of politicians and union and business representatives gathered at Parliament this morning to celebrate.
Minister for Women Julie Anne Genter said it would make a huge difference for those on the lowest wages.
"The difference in pay could be between $3 an hour or $5 an hour increase - that's between $150 and $200 a week.
"It's the difference being able to save for their future, to potentially buy a home, to spend more time with their whānau.
"It is life changing for them."
In the state sector there has already been equity settlements worth billions of dollars for caregivers, teacher aides and mental health workers.
Settlements for public service and health clerical and administrative staff, as well as nurses and midwives, are all in the pipeline.
Council of Trade Unions president Richard Wagstaff said the focus would soon turn to the private sector.
"There will be industries like ... retail, supermarkets, places like that where there is inequality and there needs to be some fixing of that."
New Zealand's gender pay gap is about 9 percent.
Wagstaff said that was a lot of money women were missing out on.
"We know that across the economy women are undervalued," he said. "If we get rid of pay inequity it will be a substantial amount of money over time."
Paul Mackay from Business New Zealand said employers welcomed the new law.
"It provides a structure and a process and criteria to allow these things to be resolved in a proper fashion through the collective bargaining process, through sitting down at the table together and working out what the answers are ... rather than leaving it to the courts, which is where - if we hadn't had this bill - we would have had to go."
Genter said the next stage in the battle for equality would be pushing towards greater pay transparency - which has already had some success in the public sector.
"Last year we saw the largest decrease in the gender pay gap in 17 years and it is currently at its lowest level ever.
"What we need now is for large employers in the private sector to start measuring their gender pay gap and being transparent about it so that they have an incentive to do something about it."
The Equal Pay Amendment Bill comes into effect in October.