Six days after a Florida jury acquitted a Hispanic man in the shooting death of an African-American teen, President Barack Obama made his first extensive comments on the case, speaking in personal terms about his own experience of being black in America.

"Trayvon Martin could have been me 35 years ago," the president said in the remarks, made Friday during a surprise appearance in the White House press room. Mr. Martin, a 17-year-old African-American, was shot and killed in Florida last year in a case that riveted...