What is it called when there is an official office of the United States in another country, and it is considered to be US soil within the gates of the office?

It is called a United States embassy or consulate. The concept of the embassy or consulate being considered US soil is known as "extraterritoriality", where the host country agrees to treat the diplomatic mission as an extension of the territory of the sending country.