Federal Bureau of Investigation Director James Comey conceded Tuesday that a mistake had been made in the early days of the investigation into the San Bernardino, Calif., terrorism attack, making it harder to get data from one of the shooters’ phones.

But Mr. Comey insisted that even without that error, the government would still need Apple Inc.’s help to open a locked iPhone.

The...