Let $(\Omega, \mathscr F, P)$ be a probability space. By definition two random variables $X, Y :\Omega \to \mathbb R$ are independent if their $\sigma$-algebras $S_X := \sigma(X)$ and $S_Y := \sigma(Y)$ are independent, i.e. $\forall A \in S_X, B \in S_Y$ we have $P(A \cap B) = P(A)P(B)$.
Let $g_a(x) = I(x \leq a)$ and take $G = \{g_a : a \in \mathbb Q\}$ (thanks to @grand_chat for pointing out that $\mathbb Q$ suffices). Then we have
$$
E\left(g_a(X)g_b(Y)\right) = E(I(X \leq a)I(Y \leq b)) = E(I(X \leq a, Y \leq b)) = P(X \leq a \cap Y \leq b)
$$
and
$$
E(g_a(X))E(g_b(Y)) = P(X \leq a)P(Y \leq b).
$$
If we assume that $\forall a, b \in \mathbb Q$
$$
P(X \leq a \cap Y \leq b) = P(X \leq a)P(Y \leq b)
$$
then we can appeal to the $\pi-\lambda$ theorem to show that
$$
P(A \cap B) = P(A)P(B) \hspace{5mm} \forall A \in S_X, B \in S_Y
$$
i.e. $X \perp Y$.
So unless I've made a mistake, we've at least got a countable collection of such functions and this applies to any pair of random variables defined over a common probability space.