The underlying framework of nature, as far as we have discovered and modeled, is quantum mechanical, and the exchange of particles is part of the quantum mechanical modeling.
In quantum mechanics one works with wave functions to compute the probability of an interaction happening, in your case a new particle appearing in the interaction. Your question could be rephrased as :" how does the proton scattering on a proton at the LHC know when to create a Higgs" . Knowledge at the particle level is contained in the mathematical models that have successfully described the particle physics data up to now.
The gravitational interaction is usually ignored, and when calculating the potential interactions between incoming particles to see what is the probability of getting the new particle, the equations take into account the electromagnetic, or weak, or strong potentials , as the gravitational one is very very small in comparison. 10^-33 of the weak force.
If one can compute at such accuracy, and if the effective quantization of gravity is assumed, then one should include the gravitational potential in the calculation of the wave functions which will give the probability of the new particle appearing. There would be diagrams with a graviton exchange.
So the answer is that the gravitational field of the earth will exchange a virtual graviton with the newly generated particle, increasing exponentially the complexity when thinking in terms of feynman diagrams and exchange particles.
It is not necessary to go into this detail because of the very small effect of gravity at the particle level. Only in very special experiments quantum mechanics enters in gravitational interactions:
The discrete quantum properties of matter are manifest in a variety of phenomena. Any particle that is trapped in a sufficiently deep and wide potential well is settled in quantum bound states. For example, the existence of quantum states of electrons in an electromagnetic field is responsible for the structure of atoms, and quantum states of nucleons in a strong nuclear field give rise to the structure of atomic nuclei. In an analogous way, the gravitational field should lead to the formation of quantum states. But the gravitational force is extremely weak compared to the electromagnetic and nuclear force, so the observation of quantum states of matter in a gravitational field is extremely challenging. Because of their charge neutrality and long lifetime, neutrons are promising candidates with which to observe such an effect. Here we report experimental evidence for gravitational quantum bound states of neutrons. The particles are allowed to fall towards a horizontal mirror which, together with the Earth's gravitational field, provides the necessary confining potential well. Under such conditions, the falling neutrons do not move continuously along the vertical direction, but rather jump from one height to another, as predicted by quantum theory