WASHINGTON—President Donald Trump, in his first State of the Union address, called for major, bipartisan deals on infrastructure and immigration, while reversing his predecessor’s vow to close the Guantanamo Bay prison facility for suspected terrorists.

The president lauded the improving economy and rising stock market, but warned about continuing threats from North Korea.

Mr....