While the effort managed to draw a handful of Republicans and was deemed a historic step by newly empowered Democrats and gun control advocates, it is unlikely to advance in the Republican-controlled Senate.
Should it become law, the bill would expand criminal background checks to nearly all gun sales, closing loopholes in federal law requiring such inspections when firearms are sold by licensed dealers but allowing private citizens to sell and transfer guns to one another without any background check.
Federal laws currently require the checks only for sales by federally licensed dealers. The new legislation would ensure buyers are vetted for private sales online and at gun shows.
Several Democrats praised the legislation while offering reminders that in recent years, with Republicans at the helm, the House took little action to address gun violence.
"Today we're offering more than thoughts and prayers," congresswoman Susan Davis said, adding that strengthening the background check system is a "small but very important first step."
The 240-190 vote prompted applause on the House floor and from the guest galleries.
Democrat John Lewis, a civil rights icon, recounted multiple mass murders in various US cities in recent years -- Pittsburgh, Las Vegas, Orlando and others -- and noted how the tragedies prompted grieving parents and students to demand action.
"Today we say to those who begged, pleaded for us to act, that we see you, we feel your pain, we heard your cries and we are going to answer -- today, now."
The bill provides exemptions for gifts between spouses, or by parents or grandparents to their children or grandchildren, or for gun loans for the purpose of hunting.
There are also exemptions that would allow immediate transfer of firearms to someone who faces "imminent death" or bodily harm, such as domestic violence victims.
The National Rifle Association, a major gun rights lobby facing the most sustained opposition in its history amid a shifting of the political landscape, opposes the measure, warning it will punish law-abiding citizens.
House Republican Doug Collins said it was "foolish" to believe the legislation would make America safer.
It "would not have stopped a single mass shooting," he said.