The existing theories of gravitation cannot solve the problem of the gravitational quantization, and the exact value of the Newtonian constant of gravitation G has not been determined. Therefore, the essence of gravity needs to be deeply explored. Here, we show that a new gravitational model is proposed, which is of the viewpoint that the universe is a composition of elementary particles and gravitational lines, and the elementary particles are connected by gravitational lines, and the essence of gravity can be tension of the gravitational lines. Based on Newton's law of gravitation, quantum mechanics, and simple harmonic wave equation, the dynamic model of gravitational driven photons is constructed: <mml:math display="inline"> <mml:mrow> <mml:mrow> <mml:mi>G</mml:mi> <mml:msubsup> <mml:mi>m</mml:mi> <mml:mi>g</mml:mi> <mml:mn>2</mml:mn> </mml:msubsup> </mml:mrow> <mml:mi>/</mml:mi> <mml:mrow> <mml:msub> <mml:mi>l</mml:mi> <mml:mi>p</mml:mi> </mml:msub> </mml:mrow> <mml:mo>=</mml:mo> <mml:mo>Δ</mml:mo> <mml:mi>n</mml:mi> <mml:mo>⋅</mml:mo> <mml:mrow> <mml:mi>h</mml:mi> <mml:mi>c</mml:mi> </mml:mrow> <mml:mi>/</mml:mi> <mml:mi>λ</mml:mi> </mml:mrow> </mml:math> . The quantization formula of the gravitational constant is derived: <mml:math display="inline"> <mml:mrow> <mml:msub> <mml:mi>G</mml:mi> <mml:mi>q</mml:mi> </mml:msub> <mml:mo>=</mml:mo> <mml:mrow> <mml:mi>K</mml:mi> <mml:msup> <mml:mi>h</mml:mi> <mml:mn>3</mml:mn> </mml:msup> </mml:mrow> <mml:mi>/</mml:mi> <mml:mrow> <mml:mn>2</mml:mn> <mml:mi>π</mml:mi> <mml:msup> <mml:mi>c</mml:mi> <mml:mn>2</mml:mn> </mml:msup> <mml:msubsup> <mml:mi>m</mml:mi> <mml:mi>g</mml:mi> <mml:mn>4</mml:mn> </mml:msubsup> </mml:mrow> </mml:mrow> </mml:math> . The calculated average is G = 6.678 804 09 × 10−11 m3 kg−1 s−2. Compared with the recommendations value of the CODATA in 2018, the deviation obtained is 0.067%. The quantum formula of gravity is derived: <mml:math display="inline"> <mml:mrow> <mml:msub> <mml:mi>f</mml:mi> <mml:mi>G</mml:mi> </mml:msub> <mml:mo>=</mml:mo> <mml:mrow> <mml:mi>K</mml:mi> <mml:msup> <mml:mi>h</mml:mi> <mml:mn>3</mml:mn> </mml:msup> </mml:mrow> <mml:mi>/</mml:mi> <mml:mrow> <mml:mn>2</mml:mn> <mml:mi>π</mml:mi> <mml:msup> <mml:mi>c</mml:mi> <mml:mn>2</mml:mn> </mml:msup> <mml:msubsup> <mml:mi>m</mml:mi> <mml:mi>g</mml:mi> <mml:mn>2</mml:mn> </mml:msubsup> </mml:mrow> </mml:mrow> </mml:math> . The gravitational model proposed in this paper solves the problem of gravitation quantization, deduces the formula of the gravitational constant and gravitational quantum, and provides a new theoretical method for deeply revealing the essence of gravity.