There are no specific guidelines about this. Often when a referral is made from one therapist to another, the gender may be a consideration due to the particular problem the client is experiencing. In some instances, for example in cases of female sexual assault, it is common practice for the victim to receive counseling and therapy from a woman. The same is true for men as sexual assault victims, i.e., they would typically see male therapist.
However, some people have their own preferences based on their life experiences and their intuition, and prefer a counselor of one gender over another for reasons they sometimes can’t articulate. And that’s fine. The point is: go to the therapist with whom you are comfortable. If you don’t know, then you certainly have the prerogative to see as many therapists as you like of each gender until you feel right about it and can pick one. If after that you still cannot decide, then you may (a) be resisting therapy before you start, (b) need to flip a coin, (c) consider ambivalence as one of your therapy issues, or (d) all of the above!
Now, could you conceivably finish a course of counseling or therapy (whether months or years) and feel that your time was wasted based on gender? Perhaps, but but it seems doubtful. Certainly your time could have been wasted, but most likely not due to gender issues. While it is certainly true that your therapy will be different from one therapist to the next, it would be difficult to say just how much of that variability had to do with gender versus any of the myriad of other variables that can impact the therapy relationship.
Some therapists, on the other hand, have very definite feelings about the gender of the therapist, and make it their top priority when making a referral. So be it. As for you the consumer, any therapist worth his or her salt will be able to discuss this issue with you in an open and honest way if it is one of your concerns, and counsel you effectively toward making a decision. Finally, take charge of the situation, and see the therapist with whom you are most comfortable, and don’t settle for less!