  Let $\GR \to B$ be a bundle of compact Lie groups acting on a fiber bundle $Y
\to B$. In this paper we introduce and study gauge-equivariant $K$-theory
groups $K_\GR^i(Y)$. These groups satisfy the usual properties of the
equivariant $K$-theory groups, but also some new phenomena arise due to the
topological non-triviality of the bundle $\GR \to B$. As an application, we
define a gauge-equivariant index for a family of elliptic operators $(P_b)_{b
\in B}$ invariant with respect to the action of $\GR \to B$, which, in this
approach, is an element of $K_\GR^0(B)$. We then give another definition of the
gauge-equivariant index as an element of $K_0(C^*(\GR))$, the $K$-theory group
of the Banach algebra $C^*(\GR)$. We prove that $K_0(C^*(\GR)) \simeq
K^0_\GR(\GR)$ and that the two definitions of the gauge-equivariant index are
equivalent. The algebra $C^*(\GR)$ is the algebra of continuous sections of a
certain field of $C^*$-algebras with non-trivial Dixmier-Douady invariant. The
gauge-equivariant $K$-theory groups are thus examples of twisted $K$-theory
groups, which have recently proved themselves useful in the study of
Ramond-Ramond fields.
