Two unrelated words collided: the noun from PIE *gʰrebʰ- (to dig) and the adjective from Latin 'gravis' (heavy).
An excavation in the earth for the burial of a corpse; (as adjective) giving cause for alarm or concern; serious, solemn, weighty.
The noun 'grave' (burial place) is native Germanic, from Old English 'græf' (trench, grave), from Proto-Germanic '*grabą' (a digging, a ditch), from the PIE root *gʰrebʰ- (to dig, to scratch). The adjective 'grave' (serious, solemn) has an entirely separate origin: from French 'grave' or directly from Latin 'gravis' (heavy, weighty, serious), from PIE *gʷreh₂- (heavy). These are two different words
The noun 'grave' (burial place) and the adjective 'grave' (serious) are completely unrelated words from different PIE roots that collided in English by pure phonological accident — one is Germanic and the other Latin, separated by thousands of years of independent evolution.