If you're talking about the same thing I'm thinking of, (the locked gates in the basement), then I can tell you it is impossible to open them before the third world of the game. Once FF5 progresses to this point, you can enter the Val Castle basement from a network of caves nearby, and unlock the doors from the inside.