WASHINGTON—A last-minute legislative change has shut major cruise ship lines out of the roughly $2 trillion coronavirus stimulus package headed for a House vote Friday, despite being one of the hard-hit industries President Trump has pledged to help.

The cruise industry was among the first to take a public hit from the virus, along with airlines and hotels, as vacationers canceled plans, local governments halted tourism and passengers on board fell ill, leading to entire vessels full of passengers being quarantined.

But...