gpe is the work done on an object to bring it to a certain point in a body's gravitational field.
W= Fs
for a greater mass more work would need to be done in order for it to cover the desired distance. therefore the massive planet would have a greater gpe.