The measure would also shed more light on "earmarks," appropriations to fund pet projects. The names of congressional sponsors would have to be revealed before a vote.
The final vote in the House was 411-8, the Los Angeles Times reported. The bill now goes to the Senate, which is also expected to pass it.
The bill bans legislators from accepting gifts and requires them to identify lobbyists who provide "bundled" contributions.
Democrats hailed the bill as fulfillment of a promise they made to voters during the 2006 campaign. Groups lobbying for more open government also praised it.
"For the first time, citizens will be able to get a full picture of how lobbyists and lobbying organizations use money in Washington, D.C., to gain access and influence in Congress," Fred Wertheimer, president of Democracy 21, said.