Being a good role model helps dispel negative images that someone not exposed to gay people might have. It's hard to think of gays as weird when your gay office mate is capable and likeable. When a coworker makes an off-color, prejudiced, or sexist remark, we know we should immediately object. In the case of persistent problems, it's helpful to build a consensus or coalition among sympathetic coworkers. Even if you can't garner a petition, remember that when it comes to discrimination and sexism, you have the law on your side.
Sexual harassment is illegal.
If you're one of those in charge, you can have a positive influence in several ways. First, hire qualified people with diverse backgrounds and offer flexible working conditions. A variety of perspectives will not only be helpful for problem solving, it will prevent stereotyping before it gets started. Second, price and market your products and services in a way that reflects your values. Third, set standards and limits as to lines you won't cross.