The U.S. trade gap shrank during the third quarter by 5.5 percent to $178.5 billion in the July-September period, the Commerce Department reported.