Definition: Gravitational energy is the potential energy held by an object because of its high position compared to a lower position.
Example: A pen being held above a table has a higher gravitational potential than a pen sitting on the table.
Definition: Mechanical energy is the sum of potential energy and kinetic energy. It is the energy associated with the motion and position of an object.
Example: A brick held at a vertical position above the ground or zero height position.
Hope this Helps!!