Disconnect your iPad from your Mac - then perform a forced-restart of your iPad:
- On an iPad with a Home button: Press and hold the top button and the Home button at the same time. When the Apple logo appears, release both buttons.
- On other iPad models: Press and quickly release the volume up button, press and quickly release the volume down button, then press and hold the top button. When the Apple logo appears, release the button.
After restarting your iPad, unlock your iPad with your iPad Passcode. When you’ve unlocked the iPad, you can attempt to reconnect with your Mac - responding to prompts as necessary.
If problems persist, try using a different cable - and/or a different USB port on your computer.
These support pages may also be useful with resolving connection issues:
If your computer doesn't recognize your iPhone, iPad, or iPod - Apple Support
About the 'Trust This Computer' alert on your iPhone, iPad, or iPod touch - Apple Support