GEMS is (among other things) an acronym used in rocketry - or, more precisely, missilery. It stands for Generalized Energy Management Steering.
It is mostly used in the context of ballistic missiles. Every ballistic missile has a maximum range that it can reach targets at, defined by such factors as the energy content and available quantity of fuel, the specific impulse of its motor(s), the mass of the missile, its coefficient of drag, and its accuracy. When a ballistic missile is fired at a target at or near its maximum range, the missile will boost smoothly and in as straight a line as possible towards a 'best range' arc which will take it to the target. But what if you want to shoot at a target which is closer than the maximum range?
If your missile uses liquid fuel, you're in luck. You can program your missile to either turn off its engines when the desired velocity (and hence range) has been achieved. But if your missile uses solid fuel, then you have a problem - because solid fuel rocket motors will always continue to burn until they have used all of their available fuel. This means your missile will only be able to hit targets out near its maximum range, as it will be unable to finish the boost phase with less than a particular amount of energy. There are some technical options - one of them is thrust termination. However, thrust termination systems are complex and expensive, and may either pose too difficult an engineering challenge for your missileers or may increase the weight and complexity of the missile unacceptably.
What else can be done? Well, your missile can use GEMS.
GEMS is a method of decreasing the range of a solid-fuelled missile by having it perform energy-wasting maneuvers during its boost phase. The most popular seem to be having the missile either yaw back and forth during boost, or having it precess in a spiral. Both of these maneuvers 'waste' a deal of the energy coming from the rocket motor as they allow the direction of thrust to deviate from the desired arc. It goes without saying that any such maneuver must also be sure to finish well before the missile runs out of fuel, so that the missile's final vector can be adjusted to match the desired one by cancelling out any deviations caused by the GEMS maneuvers. This is known as trajectory shaping.
Missiles using GEMS look a bit like they're out of control just after launch - they typically begin to spiral, and if the amount of energy to be burned off is high, those spirals may be very severe and go on for some time. If the missile is really performing GEMS (rather than boosting out of control), however, they will eventually be damped out as the missile corrects its course. The reason this method is usually restricted to unmanned systems is that generally, only ballistic missiles care about using less than their available booster energy and also the maneuvers typically result in very high g loads on the vehicle. Not only ballistic missiles use GEMS - THAAD, a U.S. ballistic missile defense missile, also performs trajectory shaping so as to place itself on an intercept with a target inside its maximum engagement envelope. A picture of the contrail left by a THAAD performing GEMS immediately after launch can be seen here.
As the name suggests, this maneuver is similar to the Terminal Area Energy Management maneuvers that were performed by the Space Shuttle in order to bring its velocity down to a safe level for landing.