The Glucose Tolerance Test (GTT) is done around 24-28 weeks of gestation to check for gestational diabetes. You are given a very sweet drink to drink about an hour before your appointment. It varies on the provider if it needs to be fasting, but typically fasting will give you more accurate results. An hour after you finish the drink your blood is taken, either by needle stick in the arm or a finger stick to check your blood sugar. They like for your blood sugar level to be under 140 in most cases. Each provider has slightly different variations, so ask what they are expecting.
If you fail the 1 hour test, you will be required to return another time to have a 3 hour test, which is completely fasting for the full 3 hours.
This is a test I believe most OB/GYNs and CNMs require, though I have heard some midwives have stopped requiring this test. If you are not sure you want to do this test, ask up front if it's required. I have heard recently that there may be some question to how accurate this test is, though I have no current research to say for sure how accurate the GTT is. There is no direct harm to your baby or you with this test.
I have had this test with all of my pregnancies. With the 3rd and 4th I had to do the 3 hour test and I passed the 3 hour with flying colors. I tried to deny this with my providers (not strongly just to see what they would say) and they were not keen on the idea, so again if you have questions about doing this test, find out the requirements of your provider early on.