According to an analysis from Standard & Poor’s, the ratings agency, the United States economy lost at least $6 billion in the five weeks the government was partly shuttered — more than the $5.7 billion that Mr. Trump had requested to build a steel or concrete barrier at the border.