I only get nervous in two situations:
1) If I don't know the material very well and the gig is important...for example, when I had to play a long orchestral piece (mostly in 13/8 fer cryin' out loud) behind Mark O'Connor at a music festival. Six hours of woodshedding with the score and the CD in the afternoon before the gig helped a lot and it came off okay.
2) If I'm doing solo fingerpicking stuff, where all eyes are on me the whole time. I have a tendency to "blank" on the complicated stuff, and I get left hanging there with no where to hide.
At a clinic a few years back, I asked Martin Simpson (a terrific British fingerstylist) about this problem. He says he never blanks and didn't really understand the question. But, he said, "I spend all my time practicing fingerstyle guitar, and thinking about it and performing it." Ah.
Those of us with lives outside of music don't have that opportunity, but one thing I've found that helps is visualization (Simpson's "thinking about it" factor). If you can "play" a whole piece in your mind, accurately visualizing every chord and run, you can do it on the gig. Again, it's all about preparation.
Eventually, when you've racked up some experience, you'll become more confident in your ability to handle all kinds of situations and contribute something valuable to the party. Then the nerves turn from "Oh, God..." to "Let's rock!"