Bowing out gracefully and raid are not often heard in the same sentence. Usually, if someone leaves, it is a /kick for screwing up too much or someone leaving in an emo rage over some loot drama.
Sometimes, it is better to bow out gracefully than to bring down the raid with you. Your gear may be to blame in some situations, or you may be falling asleep at the keyboard. You could just be having one of those days where you are completly distracted.
Obviously, in guild runs there is usually a fair bit of tolerance for having a bad day. They may even be willing to stick with you until the end. This is where bowing out gracefully comes in.
If you are just not with it, talk to your raid leader and let him know you are having a hard time for whatever reason (tired, personal issues, drunk, wife or child aggro). If you can, stay until you can find a suitable replacement. YOU should be looking for someone to take your place. When you find the person, let your raid leader know. If you can spare a sec or two, help summon your replacement. This is bowing out gracefully, and people will understand. You save face and will be back another day. You also saved possible resentment from your fellow raiders.
An example of bowing out somewhat gracefully happened in a VoA 25 pug I was in the other night. There was a Ret Pally doing about 1500 dps and a DK doing about 1200 dps. It was made know at the start of the raid that anyone unable to do at least 2.5k dps would be asked to leave. After a wipe on the first pull, the raid leader announced that these two people would have to be replaced. The Paladin did not respond. The DK replied "I know my DPS is low. I am sorry. You can replace me." He then left the raid group. The Paladin just sat there until he was booted.
Leaving the raid on your own terms is always nice (even if it is somewhat forced). You will also be much more respected than the A-Hole who get kicked and follows by pulling the boss onto the raid.
If you have a having a hard time of it, replace yourself before someone replaces you. Bowing out may get you another chance. Getting replaced may not.