Let's examine the structure you propose. This is how I interpret it: The set is $M=\{e, g_1, g_1^2, \ldots, g_1^{n_1-1}, g_2, g_2^2, \ldots, g_2^{n_2-1}\}$. Composition is non-commutative and defined as:
$$
ex = xe = x
$$
$$
g_i^a g_i^b = g_i^{a+b\bmod n_i}, \quad i\in\{1,2\}
$$
$$
g_i^a g_j^b = g_j^b, \quad i\ne j\in \{1,2\}
$$
The last one makes our object lose a lot of algebraic structure. It is not associative since $g_1(g_2g_1)=g_1^2$ but $(g_1g_2)g_1=g_1$. It is not cancellative since $eg_2 = g_1g_2$ but $e\ne g_1$. It doesn't have right division since $x g_1 = g_2$ has no solutions in $x$.
What it does have is an identity element, and all elements have a unique two-sided inverse. It also has unique left division for whatever that's worth: E.g. $g_1^a x = g_2^b$ is satisfied exactly by $x = g_2^b$.
I don't think there is a widely used term for this sort of structure, other than just discribing it when you need to. This other answer cites a paper that simply calls it a magma with inverses, but note that this would perhaps more often be called a unital magma with inverses. If I needed an ad hoc name for your specific construction, I might call it something like "the disjoint product of $\langle g_1 \rangle$ and $\langle g_2 \rangle$" (at least if that name isn't taken for something else).
[EDIT/erratum: I erroneously called the structure a loop at first. That's wrong, because a loop is a quasigroup with identity, which means it satisfies the "Latin square property"; in particular, it is cancellative].
But indeed, you should consider Steven Stednicki's comment ("What are you trying to 'do' with the object"?). This algebraic structure might not be what you're actually after, even though it matches your formal discription.