The U.S. economy added painfully few jobs for the second month in a row, undermining hopes that the sluggish recovery was getting back on track, depressing financial markets and putting new pressure on policy makers to come to the rescue.

The government's broadest snapshot of employment showed the nation added just 18,000 jobs in June. Private-sector hiring slipped to its slowest pace in over a year, and government continued shedding workers. May's equally disappointing job-creation number was cut in half.

The...