President Obama on Thursday laid out in starkly personal terms the legacy of the Civil Rights Act and presidency of Lyndon Baines Johnson, saying each was instrumental in propelling him to a place where he could become president.

Addressing a summit at the LBJ Library in Austin, Texas celebrating the law’s 50th anniversary, Obama said the Civil Rights Act and programs that Johnson created as part of the "Great Society" opened doors to people who previously could not walk through them.

"They swung open for you and they swung open for me. That’s why I’m standing here today, because of those efforts and because of that legacy,” he said.

Obama said he rejects the "cynicism" of people who want to roll back some of Johnson's programs - including Medicare and food stamps - or urge others not to "invest too much hope in our government."

"I reject such cynicism because I have lived out the promise of LBJ's efforts. Because Michelle has lived out the legacy of those efforts. Because my daughters have lived out the legacy of those efforts," Obama said. "Because millions in my generation were in a position to take the baton he gave to us."

Obama's speech comes at a time when the Democratic party seems more willing than ever to embrace Johnson, a complicated man with a complex legacy.

Obama showed both sides of Johnson when it came to civil rights. Johnson grew up in the grip of poverty and saw, as a teacher, how it had even more of a hold on people who came to Texas from Mexico. Johnson knew, Obama said, that "poverty and injustice are inseparable as opportunity and justice are joined."

After coming to Washington, Johnson spent 20 years voting against civil rights legislation. But the civil rights movement marched on, and Johnson became president.

"He knew that he had a unique capacity as the most powerful white politician from the South to not merely challenge the convention that had crushed the dreams of so many but to ultimately dismantle for good the structures of legal segregation," Obama said.

Numerous times, Obama repeated one of Johnson's most famous lines: "What the hell is the presidency for if not to fight for causes you believe in?"

Obama also spoke of the presidency in both personal and historic terms.

"You’re reminded daily that in this great democracy you are but a relay swimmer in the current of history," Obama said. "But the presidency also affords a unique opportunity to bend those currents. By shaping our laws," and bending debates, as Johnson did with civil rights legislation.

Obama, the nation's first black president, was introduced by Rep. John Lewis. The Georgia Democrat was a leader in the civil rights movement and said it is "fitting and appropriate" that Obama would address the summit.

When Obama walked into the White House, he "ushered in a time of great hope," Lewis said.

Lewis said Obama came into office on the legacy of Johnson, "who liberated not just a people, but an entire nation.”

Former presidents Bill Clinton and Jimmy Carter spoke earlier at the summit; former president George W. Bush is scheduled to speak Thursday night.