The House of Representatives approved the measure 279-147, one day after the Senate had also voted in favour of a law which had been passed under the Bush administration only to be successfully challenged in court.
Democrats from southern and western states, where the freedom to bear arms is cherished, joined Republicans in a vote that dismayed not only gun control advocates but park rangers.
Theresa Pierno, executive vice president of the National Parks Conservation Association, said: "By not taking a stand to prevent this change, Congress has sacrificed public safety in favour of the political agenda of the National Rifle Association.
"This amendment will increase the risk of poaching, vandalism of historic park treasures, and threats to park visitors and staff."
The measure was included as an amendment to a bill imposing new restrictions on credit card companies which was heavily backed by President Barack Obama.
Though the White House is understood not to favour the gun amendment, Mr Obama either has to sign it with the credit card legislation or veto the lot.
The Senate vote was a stark reversal from what was expected by many gun-control advocates after a federal judge blocked the Bush policy in March. The Obama administration accepted the court ruling, saying that the interior department would conduct a full review, but was taken aback by the senate's acceptance of the amendment, which was tabled by Senator Tom Coburn, a Republican from Oklahoma.
Critics said the measure would allow individuals to openly carry rifles, shotguns and even semi-automatic weapons on ranger-led hikes and campfire programs at national parks, as long as they are allowed by federal, state and local law.
The Brady Campaign to Prevent Gun Violence, which sued to block the Bush policy, called the senate vote reckless.
"Families should not have to stare down loaded AK-47s on nature hikes," said the Brady campaign president, Paul Helmke. "The president should not remain silent while Congress inserts reckless gun policies that he strongly opposes into a bill that has nothing whatsoever to do with guns."
Mr Coburn said the gun measure protected every American's Second Amendment right to bear arms and also protected the rights of states to pass laws that apply to their entire state, including public lands.
"Visitors to national parks should have the right to defend themselves in accordance with the laws of their states," Coburn said.
Doc Hastings, a Republican congressman, said: "The fact is American gun owners are simply citizens who want to exercise their Second Amendment rights without running into confusing red tape."
Mr Hastings and other Republicans said the bill merely aligned national parks and wildlife refuges with regulations governing the national forests and property controlled by the Bureau of Land Management.
The Republicans called the current policy outdated and confusing to those who visit public lands, noting that merely travelling from state-owned parks to national parks meant some visitors were violating the law.