How does gravitational potential energy pertain to a single gas particle escaping the atmosphere? What's the effective difference between a helium molecule moving at 11.18 km/s and one moving at 11.2 km/s at the edge of the atmosphere?  Is the idea that, with a particle moving just below the escape velocity directly away from the earth, (assuming it doesn't collide with another particle), gravity will slow it down and eventually cause it to reverse direction?
The problem I see with that is that it would require the kinetic energy of the particle to change, which would require the particle to lose thermal energy, since a gas' kinetic energy can only change through heat transfer. Given that temperature = kinetic energy in a gas particle, if the gas were to lose kinetic energy, where would that energy go in a vacuum?
Would the particle slow down until it reached 0 K and then reverse direction and heat up again by turning potential energy into kinetic energy?  That doesn't make sense to me because, in the case of a gas particle, the energy would actually have to be stored somewhere, unlike gravitational potential energy, which isn't stored in a mass but is strictly a function of its position.
This problem wouldn't apply to a solid mass being thrown at escape velocity because the temperature of the solid mass would have no effect on its potential or kinetic energy under gravity.  If you drop a red hot metal sphere or an extremely cold one, it will have no effect on its kinetic energy, in other words.  So treating the particle as a solid mass will not solve the problem.
 A: The kinetic energy of a particle moving "up" a gravity well goes into its gravitational potential energy, whether that particle is part of a gas or part of a solid object. The energy of a gas particle is not somehow different from that of a solid in that it needs to be stored "somewhere".
Remember that for a gas, a change in internal energy can arise both from heat transfer or doing work. Thermal energy does not have to always remain thermal energy and it does not have to always come from thermal energy; it can turn into other forms of energy. A particle moving against gravity does work against gravity and therefore a gas expanding out of a gravity well should (thermodynamically speaking) get colder as it pushes against that pressure. Note that the reverse process—the heating of matter as it accretes from dust and gas clouds into large objects—is responsible for half the thermal energy of the Earth's interior and for igniting the Sun.
A: "Thermal energy" and "temperature" is a useful concept for collections, but not for a single particle.  Thermal energy relate to the relative kinetic energy of the collection.  Without a collection to come to equilibrium, it makes no sense to talk about the thermal energy of your particle.
If we imagine two identical collections of particles, one high in the gravity well and one lower.  Then this particle can interact with either and the upper collection will come to equilibrium at a lower temperature than the other, because the particle gave it less energy than the other.

Would the particle slow down until it reached 0 K

Assuming it is a classical particle, you can find a frame where it is not moving and has 0 kinetic energy.  But since it is not in equilibrium, we don't talk about a temperature.
The energy it has can be distributed among other particles and then examined to become a temperature.

That energy that "is the source and the effect of the transfer of heat across a system's boundary" must still be conserved in physical terms. Internal energy is leaving the system so where is it going?

As the other answer mentions, the energy comes from the change in potential energy of the system.
The sum of the mechanical energy (GPE + KE) is constant.
If the system equilibrates high in the gravitational field, you have a particle with greater GPE and the system has slightly lower internal energy.
If the system equilibrates low in the gravitational field, you have a particle with lower GPE and the system has slightly greater internal energy.
This should be no different than the classic idea of the GPE + KE of a ball in freefall remaining constant.   There is an additional location for the energy (into thermal energy after equilibration), but the sum is still constant.

The motion of particles is what's known as thermal motion.

I would rephrase that and say that the aggregate motion of particles can be interpreted as thermal motion.  Thermal motion is a means of coalescing multiple motions into a single statistical average.  They aren't different things, they are different interpretations.  And of course we require that the particles are in thermal equilibrium for this interpretation to be useful.

It differs greatly from the motion of solid objects. A key difference is that thermal motion is frame-independent.

I would say it's not a "difference".  The thermal energy is the minimum kinetic energy of an object, the total KE measured in the frame where the center of mass is at rest.  In any other frame, the total KE is higher.  This sum over all particles is identical to the thermal energy measurement plus the KE of the mass of the system in that frame.  We are free to interpret the system as a thermal collection or as independent objects and get the same total energy.

This explains why gravity can't change the thermodynamic state change in the thermal motion of particle.

We cannot interpret an isolated particle as having an aggregate temperature.  It has a well-defined kinetic energy in any frame.  Gravity can change its kinetic energy in the earth fixed frame.  That well-defined kinetic energy can equilibrate with other particles once it joins the system.
