I think that success/achievement in the face of a challenge is a big confidence booster. In gifted kids, a special challenge I that regard is that success at age/grade-level work comes too easily and gifted kids are at risk of shutting down when something is hard.
I try to address this problem by stretching my kids. A recent example related to my daughter is that I do algebra and common core fractions/decimals with her. I teach her the common core stuff as it's meant to be taught to teachers (i.e. using algebraic expressions as parts of proofs). She gets it, and it feels good. My goal with this approach is to teach her how to stop and think when something is hard, rather than reacting by saying, "I can't do this!" because she doesn't see the solution immediately.
She also won the school spelling bee recently (was competing against middle-schoolers, and she's only 9). Learning to spell all those words was a challenge and winning taught her a big lesson about what can happen when she stretches herself and tries hard.