We have a girl in our class who repeatedly passed out during surgeries. It happened to her maybe three or four times (or maybe more?). Eventually, she was excused from scrubbing in because it was pretty much a given that she would pass out. I think she just passed out the first time or two because of low blood sugar, or fatigue, and then afterwards managed to unconsciously convince herself that she couldn't make it through a surgery without the same thing happening. I'm not sure if she ever got over it.
I myself came dangerously close to passing out on Ob/Gyn during a 2 am C-section. I was wavering, the room started spinning, and I broke out into a cold sweat. Fortunately, the circulating nurse noticed that I was looking a little unsteady and pulled me over into a chair before I went down to the ground. It was weird. I had already seen plenty of worse surgeries on my prior surgery rotation, and had even seen quite a few c-sections. I think it was the combination of not having eaten for several hours and being awakened at 2 am to stand in a suffocating sterile gown in an OR room with poor temperature control. It was a little embarrassing, but it happens.