The heart icon is a part of what Niantic is referring to as the new “motivation system.” Gyms no longer work using the old system of leveling and prestige. Rather, every Pokemon stationed in a gym now has a motivation meter, which is indicated with a red heart.

As a Pokemon is defeated in battle, its motivation is drained; the Pokemon also just generally loses motivation the longer it is in a gym. When a Pokemon’s motivation has been completely depleted, it is kicked out of the gym, and so the goal now becomes to find a gym controlled by the enemy team and drain the motivation of all of the Pokemon in there. A Pokemon’s motivation can be restored by feeding it berries.

The heart above the gym, then, is presumably a way of measuring that gym’s motivation. That way, you can tell how vulnerable it is just by walking by, something that will be useful information both if it’s an enemy team’s or if it belongs to your team. If you notice the heart is getting low and it’s an enemy gym, you’ll want to head in there for battle, whereas if it’s low and it’s your gym, you’ll want to head in there to feed the Pokemon berries.

What’s not yet clear, however, is if the heart icon indicates the average motivation of all six Pokemon in the gym, the motivation of the weakest Pokemon in the gym, or the motivation of the strongest Pokemon in the gym. This is something that will become clear as soon as Niantic re-opens the gyms, as they are still under construction. This post will be updated when more information is known about the motivation meter above a gym.

Gyms are expected to be re-enabled shortly; Niantic had previously promised that they would come back online as soon as all players got the most recent update, and this ocurred on Wednesday afternoon.