(Adds details, background)
By Mark Felsenthal and Steve Holland
WASHINGTON, April 17 (Reuters) - President Barack Obama, his gun control legislation falling to defeat, lashed out at the U.S. Congress in unusually tough terms on Wednesday as he came to grips with the loss of a key priority after spending months fighting for it.
"There were no coherent arguments as to why we wouldn't do this. It came down to politics," Obama said after the Senate failed to muster enough votes to expand background checks for firearms purchases.
Spurred by the deaths of 20 children and six educators at an elementary school in Connecticut in December, Obama had made the biggest push in decades to tighten U.S. gun laws.
But it was a solemn walk for him from the Oval Office to the steps of the Rose Garden surrounded by relatives of the Sandy Hook Elementary School victims.
With them were Gabrielle Giffords, an Arizona congresswoman who was shot in the head and now walks with a limp, and Vice President Joe Biden, who had led a task force that proposed gun regulations that all went down in defeat.
As Obama spoke, many in the group gathered with him looked on sadly. Some wept openly.
Obama's biting remarks, saying the National Rifle Association "willfully lied" and that a determined minority in the Senate thwarted the legislation, reflected a pessimistic tone unusual for the normally upbeat president.
It was a sign that ongoing Washington gridlock had become even more frustrating for him less than three months into his second term.
"All in all this was a pretty shameful day for Washington but this effort is not over," Obama said.
The president blamed the failed vote on Republicans who caved in to pressure from the gun lobby despite polls showing strong support for expanded background checks.
"Ninety percent of Democrats in the Senate voted for that idea," he said. "But it's not going to happen because 90 percent of Republicans in the Senate just voted against that idea."
While insisting he would not give up on the guns effort, vowing action will be taken in the long run, Obama made clear he would use the issue to campaign on behalf of Democratic candidates in the 2014 midterm congressional elections.
"So to change Washington, you, the American people, are going to have to sustain some passion about this. And when necessary, you've got to send the right people to Washington," he said.
In a poignant note, Obama was introduced in the Rose Garden by Mark Barden, who lost a son, Daniel Barden, in the Sandy Hook massacre.
"We will not be defeated. We are not defeated, and we will not be defeated," said Barden.
Obama now turns his attention to other priorities, an immigration overhaul and a "grand bargain" deficit reduction package, that face similar struggles in a divided Congress.
And suddenly he has a new challenge before him, the threat of terrorism raised by the Boston Marathon bombings on Monday.
But as he left the White House to have dinner with a dozen Democratic senators, part of a schmooze offensive that has yielded scant results thus far, a somber mood prevailed.
(Additional reporting by Jeff Mason; Editing by Eric Beech and Lisa Shumaker)
Obama On Gun Vote: 'This Was A Pretty Shameful Day For Washington'