After you get the Pendant of Power and Pendant of Wisdom, go get the Master Sword from the Lost Woods.
In Sahasrahla's telepathic message to you, he says that now that you have the three pendants, you should go to the Lost Woods to get the Master Sword. The Lost Woods are in the northwest part of the northwest forest.
When you reach the Lost woods, a group of Poe ghosts appears. One of the Poes talks to you and says to follow him. Keep an eye on the one that talked to you and watch while the poes move around. Do your best to follow the one that talked to you. If you follow the wrong one, you'll have to start over. It's random each time.
The next time you encounter the ghosts, two of them will talk to you. They say NOT to follow them, because they will deliberately go the wrong way. If you follow either of the ones that talked to you, you will have to start over.
Next time, three of them will talk to you, and if you follow any of those three, you'll have to start over.
After all of that, you will reach a grove with animals. Go north and stand behind the Master Sword and pull it out of the pedestal.
Sahasrahla will contact you and tell you to go to Hyrule Castle, where you can use the Master Sword to break the barrier. When you go the castle, Sahasrahla is there. Cut the barrier on the gate with your sword. The barrier will disappear.
Go into the castle. Zelda is not in the throne room. Go into the east or west room, then go outside. Go to the middle and go through the north door to reach Inside Hyrule Castle.