Gravity is directly proportional to mass. Density has nothing to do with the equation. Gas giants have high gravity because even though they aren't dense, there's a lot of mass involved.
But also inversely proportional to the square of the radius. Thus a larger, but less dense, planet will have a lower surface gravity than another of the same mass.
What is the mathematical formulae for gravity?