You'll need to obtain the National Dex before you can move any further on that island. Once you have it, those two guys will let you pass and you can continue your adventure.