The universal gravitational constant (G)

This tool can provide you with the dependence and scale. For example, using Dimensional analysis one can easily derive how the Period of a pendulum, T, is dependent on string length and acceleration of gravity thus: [itex] T \propto \sqrt{ \frac{l}{g} } [/itex]
The problem of course is that you need to know apriori that the Period is only dependent on string length and gravity, and not anything else (For example, if you don't neglect air viscosity the answer will be different).

Now, I tried the method on planets and asked how is the Period of a planet circling the sun dependent on other parameters. I assumed that the Period is only dependent on distance from the sun and the sun's mass. Of course, no time unit can be derived from mass and distance. So I was stuck!

I realized that I was missing something, and that something was the universal gravitational constant (G). But then it got me thinking what is G??

Yes, the gravitational constant connects mass to distance and time. Just as by taking the speed of light (c) to be 1 we get ability to measure time in meters or length in seconds. By analogy, by taking G to be 1, we get the ability to measure mass in meters.

One funny thing is that we know better the mass of the Sun in meters than in kilograms. We are able to precisely measure the mass of the Sun in meters using various relativistic phenomena. Then we can derive the mass in kilograms knowing the value of G, but the accuracy of the measurements of G is lower than the accuracy of measurements of the Sun mass in meters.

You don't even need relativity. Newtonian mechanics does quite nicely. Solar system astronomers never use mass. They use an object's gravitational parameter. The object's mass is it's gravitational parameter divided by G. The gravitational parameter is highly observable for the Sun and those planets that have satellites. That one has to divide by G to obtain mass in mass units means mass is known to a significantly reduced precision. Another way of looking at it: We can measure masses of the moons, planets, and the Sun in units of length3/time2 to a much higher degree of precision than in units of mass.