Obama, giving the commencement address at Barnard College, the all-women's institution that is a sister school to his alma matter Columbia University, urged the graduates to "fight for your seat at the table -- better yet, fight for a seat at the head of the table."
The graduation ceremony was held on the quad at Columbia University in New York City.
Obama said many workplaces still have outdated policies because women only account for 3 percent of the chief executives at Fortune 500 companies. He urged the young women to run for office.
"One reason we're actually refighting long-settled battles over women's rights is because women occupy fewer than 1-in-5 seats in Congress," the president said.
"But if you -- if you decide not to sit yourself at the table, at the very least, you've got to make sure you have a say in who does. It matters."
He cited the influence female lawmakers have had in Congress over the past four decades.
"So don't accept somebody else's construction of the way things ought to be. It's up to you to right wrongs. It's up to you to point out injustice. It's up to you to hold the system accountable, and sometimes upend it entirely."
He said more women are now graduating from college than men because earlier generations of women "shattered the myth that you couldn't or shouldn't be where you are."
The president, who voiced support last week for same-sex marriage, urged the graduates to take inspiration from previous generations.
"Young folks who marched and mobilized and stood up and sat in, from Seneca Falls to Selma to Stonewall, didn't just do it for themselves. They did it for other people. That's how we achieve women's rights. That's how we achieved voting rights. That's how we achieved workers' rights. That's how we achieve gay rights. That's how we've made this union more perfect.
"If you're willing to do your part now, if you're willing to reach up and close that gap between what America is and what America should be, I want you to know that I will be right there with you."
Couple mistakenly served bag of cash at McDonald's drive-thru
Exploding whale video goes viral on Internet