He called on his adversaries to "appeal to each other's basic decency instead of our basest fears," and he said he longed for a political reality free of "gotcha moments or trivial gaffes or fake controversies." He said a better politics would allow Republicans and Democrats to come together on reforming the criminal justice system in the wake of shootings in Ferguson, Mo., and Staten Island, N.Y.
Read MoreStocks that may get a State of the Union boost
Mr. Obama's plans — which would offer free community college for millions of students, paid leave for workers and more generous government assistance for education, child care and retirement savings for the middle class — are to be financed in large part by $320 billion in tax increases over the next decade on higher income earners as well as a fee on large financial institutions.
The tax plan would raise the top capital gains tax rate to 28 percent, from 23.8 percent. It would also remove what amounts to a tax break for wealthy people who can afford to hold on to their investments until death. Mr. Obama also said he wanted to assess a new fee on the largest financial institutions — those with assets of $50 billion or more — based on the amount of risk they took on.
Those proposals would pay for the community college initiative, which would cost $60 billion over a decade, as well as an array of new tax credits intended for the middle class. They include a new $500 credit for families with two working spouses; a subsidy of up to $2,500 annually to pay for college; and the tripling, up to $3,000, of an existing tax break to pay for college.
"It's time we stop treating child care as a side issue, or as a women's issue," Mr. Obama said, "and treat it like the national economic priority that it is for all of us."
Mr. Obama said that the approach of walling off the United States from Cuba had been ineffective, and that it was time to try a new strategy. Seated in the first lady's box overlooking the House chamber, Alan P. Gross, the American prisoner freed in December as part of the new détente, repeatedly mouthed "thank you" when Mr. Obama recognized him.
The president argued that the United States had an opportunity to strike a deal with Iran to prevent its development of a nuclear weapon, and he made it clear that he opposed legislation — backed by some Democrats and Republicans — to impose new sanctions before those talks had played out.
"We lead best when we combine military power with strong diplomacy, when we leverage our power with coalition building, when we don't let our fears blind us to the opportunities that this new century presents," Mr. Obama said.
And after several high-profile cyberattacks, including one against Sony Pictures that his administration blamed on North Korea, Mr. Obama called for legislation to bolster protections against such computer-enabled assaults.
"No foreign nation, no hacker should be able to shut down our networks, steal our trade secrets or invade the privacy of American families, especially our kids," the president said. "If we don't act, we'll leave our nation and our economy vulnerable. If we do, we can continue to protect the technologies that have unleashed untold opportunities for people around the globe."