You are both right, in a way. Much of the heat stored in the Earth was created by gravity originally through the kinetic energy it instilled in the proto-planetary bodies that formed it, but gravity does not create additional heat in stationary objects. The energy created by a force is measured by the distance over which that force is applied. So an object at rest, such as the Earth (at rest relative to itself), does not produce any energy from its own gravity. It did produce that energy at the time it formed, however, by applying the force of gravity over the distance that the falling proto-planetary bodies traveled to reach their final relative position. (It's true that the Earth's insides aren't exactly static, but there is very little net movement any more and so very little net change in internal energy due to Earth's gravity. Ask yourself how much the earth shrinks each year due to gravitational compression.)
Think of dropping an object. When you hold it up and drop it, gravity gives it energy in the form of kinentic energy. When it hits the ground, it releases that energy as heat and sound. Once it's just sitting there gravity continues to act on it, but it doesn't generate any more energy it in it.
The formula at work here is: Work = Force * distance. Work is a form of energy and winds up as heat eventually (as all energy does).