President Obama, shifting the focus from his recent endorsement of same-sex marriage to what he portrays as a lifelong belief in the essential role of women, told female graduates of Barnard College in New York City on Monday that they should go out and “fight for a seat at the head of the table.”

In a speech that promoted his record on women’s issues and drew a not-so-subtle distinction with the views of Republicans, including his presumptive challenger, Mitt Romney, Mr. Obama urged members of the class of nearly 600 to climb to the top of the corporate ladder or run for public office.

The dearth of female lawmakers in Congress, the president declared, was “one reason we’re actually refighting long-settled battles over women’s rights.” The shortage of female chief executives at major companies, he said, was “one reason many workplaces still have outdated policies.”

“It’s up to you to hold the system accountable and sometimes upend it entirely,” Mr. Obama said to a friendly audience on the Morningside Heights campus of Columbia University. “It’s up to you to stand up and be heard, to write, and to lobby, to march, to organize, to vote. Don’t be content just to sit back and watch.”