President Donald Trump’s call this week for a separate U.S. “space force” was the culmination of months of frustration over what he felt was a lack of Pentagon action on his initial suggestions about the topic, according to people familiar with the decision.

The announcement on Monday—which surprised many military officials, senior aerospace industry executives and lawmakers—went against well-known opposition by Pentagon leaders to the idea of establishing a new branch of the U.S. armed forces.

The...