Spending declined for many other retail sectors. Sales of building supplies and garden equipment fell 2.2%, even as home prices have continued to climb this year and new home sales hit a five-year high in May.

Restaurants, department and grocery stores, along with sales of electronics felt a pinch, as well.

"It was a gain, but it was a weak one at that," said Jennifer Lee, senior economist at BMO Capital Markets. "Despite steady job gains, homes that are worth more, record high stock prices, U.S. consumers are staying cautious when it comes to buying."

The monthly retail sales number is a closely watched one, since consumer spending accounts for more than two-thirds of the nation's overall economy. The June jobs report showed that the retail sector added 37,000 jobs in June, which means that retail sales can be a sign of overall economic growth.