Deputy Attorney General Rod Rosenstein defended the Justice Department and FBI Wednesday, calling their employees “some of the most patriotic and public-spirited American citizens” after President Donald Trump again accused the FBI of “spying” on his 2016 campaign.

The public back-and-forth Wednesday was the latest between top U.S. law-enforcement officials on one side and the president and his allies on the other. It came a day before a meeting between Justice Department officials and GOP lawmakers on the FBI’s use of a confidential...