I have seen where the iPad sees the library but when trying to connect, the wheel keeps spinning.
I also have seen where the iPad connect but immediately throws a “You do not have permission to access the requested resource” message.
After the normal troubleshooting steps such as restarting the router fails, stop/start home sharing fail.
What fixes it for me every time is the resetting of the network settings on the iPad.
Go to “Settings”, then “General,” go to “Reset”, then “Reset Network Settings.”