1550s, "solemnly," from grave (adj.) + -ly (2). Meaning "in an important degree" is by 1835.
Entries linking to gravely
grave adj.
1540s, "influential, respected; marked by weighty dignity," from French grave (Old French greve "terrible, dreadful," 14c.), from Latin gravis, "heavy, ponderous, burdensome, loaded; pregnant;" of matters, "weighty, important;" of sounds, "deep, low, bass;" figuratively "oppressive, hard to bear, troublesome, grievous," from PIE root *gwere- (1) "heavy."
In English, the sense "solemn, sober" is from 1580s; of immaterial things, "important, serious" 1590s. Greek barys (opposed to kouphos) also was used figuratively, of suffering, sorrow, sobbing, and could mean "oppressive, burdensome, grave, dignified, impressive." The noun meaning "accent mark over a vowel" is c. 1600, from French.
-ly 2
common adverbial suffix, forming from adjectives adverbs signifying "in a manner denoted by" the adjective, Middle English, from Old English -lice, from Proto-Germanic *-liko- (cognates: Old Frisian -like, Old Saxon -liko, Dutch -lijk, Old High German -licho, German -lich, Old Norse -liga, Gothic -leiko); see -ly (1). Cognate with lich, and identical with like (adj.).
Weekley notes as "curious" that Germanic uses a word essentially meaning "body" for the adverbial formation, while Romanic uses one meaning "mind" (as in French constamment from Latin constanti mente). The modern English form emerged in late Middle English, probably from influence of Old Norse -liga.