The plans would also bring together all previous discrimination law into a single piece of legislation which she said would cut red tape for business.
Allowing "positive action" would help organisations such as the police better reflect the communities they serve by recruiting more female and ethnic minority officers, said Ms Harman.
But if, for example, a headmistress wanted to discriminate in favour of a male teacher to balance an all female team that would be allowed too.
Asked how she could justify discrimination in the name of equality, she said she wanted tackle "patterns of discrimination" in the workforce and ensure firms were "not just 'entrenched in the old boy network'".
Age discrimination in the workplace has been illegal since 2006, but the new legislation will tackle more widespread forms of age-related prejudice.
It also aims to close the gender pay gap by forcing firms to publish pay rates.
Female part-time workers still earned 40% less per hour than their full-time male counterparts, Ms Harman told Today BBC Radio 4's Today programme.
"Do we think she is 40% less intelligent, less committed, less hard-working, less qualified? It's not the case. It's entrenched discrimination. It's allowed to persist because it's all swept under the carpet."
The bill will also seek to stop pensioners being denied NHS treatment because of their age, although doctors will still be able to refuse treatment if they believe there are sound clinical reason for doing so.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.