1. Defeat the Gym Leader in Ecruteak City: You'll need to defeat the Gym Leader, Morty, who specializes in Ghost-type Pokémon. This is the 4th Gym in the game.
2. Talk to the Old Man: After defeating Morty, return to the lighthouse. You'll find an old man there. Talk to him, and he'll explain the lighthouse's importance and tell you the door is currently locked.
3. Obtain the Key: Now, you need to venture into the nearby Ecruteak City and find a small house with a man outside. Talk to him, and he will give you the key to the lighthouse.
4. Unlock the Lighthouse: Go back to the lighthouse and use the key to unlock the door. You can now enter and explore!
Let me know if you have any other questions about Pokemon Gold!