Apple updates and changes their security settings from time to time, for connecting your devices to your laptop/PC or Mac via iTunes. Sometimes, there may be a pop-up on your device to "trust computer" and you have to select "Yes" in order for your device to be properly connected via the Lightning connector cable to your computer.
Elsewhere, someone suggested "re-setting" the phone and this allows iTunes on your computer to treat it as a new device. You have to remember to click "yes" to the "trust this computer" prompt.
Another method, depending on the iOS version you run on your device, is that I had to remember to pull down the menu on Photos to "import" and then unlock the iPhone, and it worked; this may be a different problem than what you posted of course.