The measure, which was passed unanimously, penalises banks that do business with Chinese officials.
It will have to be approved by the Senate before going to President Trump.
Critics say China's law ends freedoms that were guaranteed for 50 years when British rule ended in 1997.
"The law is a brutal, sweeping crackdown against the people of Hong Kong, intended to destroy the freedoms they were promised," said House Speaker Nancy Pelosi.
UK Prime Minister Boris Johnson said the passing of the law was a "clear and serious breach" of the 1985 Sino-British joint declaration.
Under this declaration, Hong Kong was handed back to China in 1997, with certain freedoms guaranteed for at least 50 years under the "one country, two systems" agreement.
The UK has offered residency, and then citizenship, to up to three million Hong Kongers.
But on Thursday China threatened "corresponding measures" to block the citizenship plan.
"If the British side makes unilateral changes to the relevant practice, it will breach its own position and pledges, as well as international law and basic norms," said the Chinese Embassy in the UK.
Meanwhile, a 24-year-old man from Hong Kong - suspected of stabbing a police officer during Wednesday's protests - has been arrested on a plane while trying to flee to London.
The suspect, known only as Mr Wong, was detained on the plane moments before it set off.
China said the security law was necessary to stop the type of protests seen in Hong Kong during much of 2019.
And despite condemnation in the West, more than 50 countries, led by Cuba, supported China at the UN this week.
What does the US law say?The Hong Kong Autonomy Act imposes sanctions on banks that do business with Chinese officials who are involved in cracking down on pro-democracy protesters in Hong Kong.
Ms Pelosi said the law was an "urgently needed response to [China's passing] of its so-called 'national security' law... which is purpose built to dismantle democratic freedoms in Hong Kong".
Before the bill was signed, the US had already begun eliminating Hong Kong's special status - halting defence exports and restricting the territory's access to high-technology products.
Last year, the US also signed into law the Human Rights and Democracy Act, supporting pro-democracy protesters in Hong Kong.
What have other countries said?The UK said it would offer up to three million Hong Kong residents the chance to settle there and ultimately apply for full British citizenship.
Australia is also "actively considering" offering safe haven to Hong Kong residents - with Prime Minister Scott Morrison saying there were proposals that will "soon be considered by cabinet".
Meanwhile a senior Taiwanese official said its citizens should now avoid unnecessary transits through or visits to Hong Kong.
Chiu Chui-Cheng, deputy head of Taiwan's Mainland Affairs Council, said the new security law was "the most outrageous in history". Taiwan's de facto consulate in Hong Kong would continue to operate, he said.
Japan was among the other countries that spoke out against the law, calling it "regrettable".
"It will undermine trust for the principle of 'one country, two systems'," said Foreign Minister Toshimitsu Motegi.
European Council President Charles Michel said it "deplored" the law, which he said had a "detrimental effect on the independence of the judiciary and rule of law".
And Canada changed its travel advice to Hong Kong, saying the new law "increased the risk of arbitrary detention on national security grounds and possible extradition to mainland China".
Yesterday, a senior Chinese official hit back at foreign critics, saying Hong Kong's affairs were "none of your business".
Have all countries been critical?No. At the United Nations this week, Cuba - on behalf of 53 countries - welcomed the law.
Speaking at the 44th session of the United Nations Human Rights Council, it said: "Non-interference in internal affairs of sovereign states is an essential principle enshrined in the Charter of the United Nations.
"We believe every country has the right to safeguard its national security through legislation, and commend relevant steps taken for this purpose."
How has the new law been used so far?Just hours after the law was passed, Hong Kong police made their first arrests.
Ten people were accused of violating the new law, including a man with a pro-independence flag. About 360 others were detained at a banned rally.
Under the new law, inciting hatred of China's central government and Hong Kong's regional government are offences.
Acts including damaging public transport facilities - which often happened during the 2019 protests - can be considered terrorism.