First, run a sink of hot water with a bit of dish soap in there. Then add a couple of cups of white vinegar. Gently place the glasses in and let them soak for awhile. A gentle washing should take care of the issue. Don't use anything abrasive; it will scratch your glasses!
If it is being really stubborn, fill a container with some white vinegar that one glass at a time will fit in. Add the vinegar and the glass and let soak for at least a couple of hours and then hand wash and rinse. Repeat using the same vinegar for the rest of the glasses.
Also, try running a couple of loads in the dishwasher with the white vinegar added. Start the dishwasher, let it start to wash and then shut it off for an hour or so. Restart and let it complete the cycle. After that, look inside for build up of soil along the door edge (down at the bottom) and make sure all the holes in the spray arms are not blocked. Also make sure your water is hot enough to thoroughly dissolve the detergent you are using. Dish washers need water of about 160 F to properly dissolve the detergent and get the dishes clean. In an effort to reduce our energy bills, many of us keep our water heaters at a lower setting. Also, the type of detergent your are using could be the problem. My appliance guy only recommends the powder or the compressed powder tablets. He says the liquid has clay like additives that will block your filters, the plastic coated packets don't always dissolve and do the same. He's not a fan of the gels either.
But it might be as simple as just running 1 or 2 loads a month with a couple of cups of white vinegar in to keep the minerals from building up.