The new law will apply to all organisations which employ more than 10 people.
Labour Minister Bandaru Dattatreya said the law was "a humble gift" to women.
India now gives the third longest duration of fully paid maternity leave in the world, behind Canada and Norway, which give 50 and 44 weeks respectively.
The bill was first approved by India's upper house of parliament last year, but became a law after the lower house passed it on Thursday.
However, women will be able to avail the 26-week leave only for their first two children.  After that, they will be entitled to just 12 weeks.
Activists say that the law will encourage more women to pursue their careers after pregnancy.
A survey by industry body Assocham last year found that a quarter of Indian women give up their careers after having a baby.
However some critics say that the law could impact hiring decisions of companies.
Will new maternity law help keep Indian women in work?
Maneka Gandhi, Minister of Women and Child Development, said she was "very, very happy" that history had been made.
"This will help thousands of women and lead to much healthier children," she said.
India's parliament has passed a law that increases paid maternity leave from 12 to 26 weeks.