Attempts to ban assault-style rifles and high capacity ammunition magazines also faced certain defeat in a series of showdown votes four months after a gunman killed 20 elementary school children and six staff members at Sandy Hook Elementary.
The background check measure commanded a majority of senators, 54-46, but that was well short of the 60 votes needed to advance. Forty-one Republicans and five Democrats sided together to scuttle the plan.
The vote was a jarring blow to the drive to curb firearms sparked by December's massacre of 26 young children and staff at an elementary school in Newtown, Connecticut.
Obama has made enactment of greater curbs a priority on his domestic agenda in the months since the massacre, making several trips outside Washington to try and build support. Last week, he traveled to Connecticut, and he invited several parents to fly back to Washington with him aboard Air Force One so they could personally lobby lawmakers.
To an unusual degree for professional politicians, some senators said afterward that they had not wanted to meet with the mothers and fathers of the dead, or said it was difficult to look at photographs that the parents carried of their young children, now dead.
Some of the parents of the Sandy Hook victims watched the votes from the spectators' gallery that rings the Senate floor. They were joined by relatives of victims of other mass shootings in Arizona, Virginia and Colorado.
The roll call was also a victory for the nation's most powerful gun lobby, the National Rifle Association, which opposed the plan as an ineffective infringement on gun rights.
The proposal would have required background checks for all transactions at gun shows and online. Currently they must occur for sales handled by licensed gun dealers.
Even before the vote began it was apparent that bill was in deep trouble with a growing number of Senators saying they would vote against the measure.
In the hours before the key vote, Sen. Joe Manchin, one of the bill's sponsors, bluntly accused the National Rifle Association of making false claims about the expansion of background checks that he and Sen. Pat Toomey were backing.
"I don't know how to put the words any plainer than this: That is a lie. That is simply a lie," he said, accusing the organization of telling its supporters that friends, neighbors and some family members would need federal permission to transfer ownership of firearms to one another.
The NRA did not respond immediately to the charge, but issued a statement after the vote that restated the claim. The proposal "would have criminalized certain private transfers of firearms between honest citizens, requiring lifelong friends, neighbors and some family members to get federal government permission to exercise a fundamental right or face prosecution," said a statement from Chris Cox, a top lobbyist for the group.
Senate votes were set on a total of nine provisions, some advanced by lawmakers on each side of an issue in which Democrats from rural or Southern states generally lined up with the overwhelming majority of Republicans.
Whatever the outcome, the events were unlikely to be the last word on an issue that Democratic leaders shied away from for nearly two decades until Obama picked up on it after the Newtown shootings.
Vice President Joe Biden presided over the Senate, a symbolic move since each proposal required a 60-vote majority to pass and he would not be called upon to break any ties. Democratic aides said in advance the issue would be brought back to the Senate in the future, giving gun control supporters more time to win over converts to change the outcome.
The day's key test concerned the background checks, designed to prevent criminals and the seriously mentally ill from purchasing firearms. Under current law, checks are required only when guns are purchased from federally licensed firearms dealers. The proposal by Manchin and Toomey called for extending the requirement to other sales at gun shows and on the Internet.
Their bipartisan approach was widely seen as advocates' best chance for winning enough GOP votes to change current law in a way that Obama and gun control groups support. But foes had proposals of their own, including one that would require states that issue concealed weapons permits to honor the permits from other states.
Numerous polls in recent months have shown support for enhanced gun control measures, including background checks, though it may be weakening.
An Associated Press-GfK poll this month showed that 49 percent of Americans support stricter gun laws, down from 58 percent in January. In that recent survey, 38 percent said they want the laws to remain the same and 10 percent want them eased.