He said was signing the bill not only in honor of Ms. Ledbetter  who stood behind him, shaking her head and clasping her hands in seeming disbelief  but in honor of his own grandmother, “who worked in a bank all her life, and even after she hit that glass ceiling, kept getting up again” and for his daughters, “because I want them to grow up in a nation that values their contributions, where there are no limits to their dreams.”

The ceremony, and a reception afterward in the State Dining Room of the White House, had a celebratory feel. The East Room was packed with advocates for civil rights and workers rights; the legislators, who included House and Senate leaders and two moderate Republicans  Senators Susan Collins and Olympia Snowe, both of Maine  shook Mr. Obama’s hand effusively (some, including House Speaker Nancy Pelosi, received presidential pecks on the cheek) as he took the stage. They looked over his shoulder, practically glowing, as Mr. Obama signed his name to the bill, using one pen for each letter.

“I’ve been practicing signing my name very slowly,” Mr. Obama said wryly, looking at a bank of pens before him. He handed the first pen to the bill’s chief sponsor, Senator Barbara Mikulski, Democrat of Maryland, and the last to Ms. Ledbetter.

The ceremony also marked First Lady Michelle Obama’s policy debut; she spoke afterward in a reception in the State Dining Room, where she called Ms. Ledbetter “one of my favorite people.”

Mr. Obama told Ms. Ledbetter’s story over and over again during his campaign for the White House; she spoke frequently as an advocate for him during his campaign, and made an appearance at the Democratic National Convention in Denver.