he European Community yesterday accused the U.S. government of violating international law by widening restrictions on U.S.-developed technology for a natural gas pipeline between the Soviet Union and Western Europe.

Community foreign ministers also said they planned to resist U.S. antisubsidy duties on European steel exports and take action against alleged U.S. subsidies to U.S. steel companies.

President Reagan's special trade representative, William Brock, is set to travel to Brussels today for emergency talks to defuse the worsening divisions over trade policy between the United States and its European allies. Brock will stop in Brussels on his way home from a visit to Egypt because the administration has been alarmed at recent European reaction to both the steel measures and the broadening of the restrictions on exports for the gas pipeline.

European Commission Vice President Etienne Davignon said the community was considering taking Washington to an international court over the ban on the supply of technology for the gas pipeline.

Top Japanese officials in Tokyo also criticized the Reagan administration's sanctions because they blocked a joint Soviet-Japan offshore oil development project in the northwest Pacific.

Japanese officials said letters were being sent to Secretary of Commerce Malcolm Baldrige and Secretary of State Alexander M. Haig Jr. asking the United States to reconsider the decision.