From my understanding, the gravitational constant $G$ is a proportionality constant used by Newton in his law of universal gravitation (which was based around Kepler's Laws), namely in the equation $F = \frac{G\cdot M\cdot m}{r^2}$. Later, Einstein set forward a different theory for Gravity (based around the equivalence principle), namely General Relativity, which concluded that Newton's law was simply a (rather decent) approximation to a more complex reality. Mathematically speaking, Einstein's Theory was completely different from Newton's Theory and based around his Field equations, which also included $G$ in one of it's terms.
How come two different theories that stemmed from completely different postulates end up having this same constant $G$ with the same numerical value show up in their equations? What exactly does $G$ represent?