When we compactify string theory, we are interested in the effective theory in the remaining dimensions, and perform a generalization of Kaluza-Klein reduction. Now, where in flat 10 dimensions the sum over worldsheets in the string amplitudes needed only to sum over the different kinds of worldsheets (their moduli and genus), we now have to distinguish between worldsheets that still live in flat space and those that "catch on" to some of the compactified dimensions. Where in flat space all embeddings $X:\Sigma \to \mathbb{R}^{10}$ necessarily have trivial homology and hence have no topological character, in compactified space it can happen that the image of the embedding is not homologically equivalent to a point (just as in Kaluza-Klein theory a path around the circle in the fifth dimension is not equivalent to a point) - we cannot contract all worldsheets to be infinitesimally small because "holes" like the hole in a 1d circle are in the way.
Physicists usually then speak of a string (or brane) "wrapping" this non-trivial cycle in homology. The number of these cycles will typically affect the coupling strength and/or the number of particles in the effective theory after compactification, in the simplest case you get one particle or one set of particles (a multiplet) for each distinct cycle, with the properties like "volume" of the cycle dictating coupling strengths and masses of the particles. Like with the Kaluza-Klein tower, wrapping the branes more than once around these cycles will typically produce an infinite number of increasingly irrelevant (because more massive/less coupled) contributions. The brane configurations that are most relevant are often called the "BPS-states" of M-theory.
Now, Gromov-Witten invariants are pretty complex objects, but in specific circumstances, they count homology classes of specific holomorphic curves inside a manifold $M$, and a holomorphic curve is essentially a holomorphic map $\Sigma_g \to M$ for some Riemann surface $\Sigma_g$.
...and now there are also some limits of string theory/M-theory where the kinds of "wrappings" we're interested in are those of worldsheets where the coordinates $X:\Sigma\to M$ have become holomorphic maps. I don't know of a good heuristic way to explain why, but in any case, we're now interested in how many distinct ways there are to wrap a string in a holomorphic fashion around some of the compact dimensions. This is precisely what the G-W invariants count.
If you want the meat of the computations, some starting points are "Gromov-Witten Theory and Threshold Corrections" by Grünberg - rather "modern" and mathematical, with a review character, "M-Theory and Topological Strings–I" by Gopakumar and Vafa and "N=2 Type II – Heterotic Duality and
higher derivative F-terms" by Antoniadis, Gava, Narain, Taylor, both of the latter being more "physicsy" and closer to the first discovery of the so-called "F-terms" in which the G-W invariants and potentials appear.