The U.S. and Russia clashed at the United Nations Security Council over how to respond to North Korea’s nuclear-weapons program, a confrontation throwing into doubt U.S. hopes for an international diplomatic solution to the burgeoning crisis.

The standoff between diplomats on Wednesday came just two days before President Donald Trump and Russian counterpart Vladimir Putin plan to hold their first meeting during the summit of the Group of 20 leading nations in Germany, raising the stakes for both leaders as well as China, which...