How do you get in the desert in Ocarina of Time?

Once you beat Gerudo Fortress and gain the membership card (see this walkthrough for example), speak with the guard that is up the top of a ladder next to the big gate. She'll let you through to the next area.

You have to use the longshot to cross to the other side of the quicksand, and then follow the red flags until you reach a small tower.

Put on the lens of truth and follow the ghost that you can see. At the end of this area you'll arrive in the Desert Colossus.