WASHINGTON—The U.S. trade deficit widened in April as Americans stepped up purchases of foreign goods such as cell phones and equipment.

The trade gap in goods and services with other nations increased 5.2% from a month earlier to $47.62 billion, the Commerce Department said Friday. Imports grew 0.8% while exports fell 0.3%.

Economists surveyed...