JERUSALEM—The U.S. cemented its ties to Israel by opening a new embassy in Jerusalem, as clashes between Palestinian protesters and Israel’s military left dozens dead and added to the Trump administration’s challenges in the Middle East.

The ceremony, held in a large tent beside the new embassy site, was attended by top Israeli and U.S. officials. “This is a great day for Israel, it’s a great day for America,” Prime Minister Benjamin Netanyahu of Israel told the attendees. “I also believe it’s a great day for peace.”

Some...