Surface gravity comes from Newton's law of gravitation applied at a body's surface. It scales with mass and inversely with the square of the radius.

Gas giants like Jupiter technically have no solid surface, so their 'surface' gravity is defined at the level where atmospheric pressure equals 1 bar.