Eliminate access to specific user based on url, uid and role
I don't understand what you want to do specific to the panels page. In general you are looking for some kind of hook triggered every time a user visits a page. In D8 every page is connected to a route. You have to implement an access check on this route, see the documentation Access checking on routes. You can define the access check when you create a route or if you have an existing route from another module you can alter the route definition, see for this the next chapter in the documentation Altering existing routes