Got to iPad Settings:
Settings > 
Privacy & Security > 
Wired Accessories. Options include "Always Ask," "Ask for New Accessories," or "Automatically Allow When Unlocked".

Switch to Ask for New Accessories.  

Plug the headphones back in and see if it prompts to allow the headphones.