A total of 21 Democrats voted with a majority of Republicans in the House on Tuesday to end a partial government shutdown.