Old English gyltig "offending, delinquent, criminal," from gylt (see guilt (n.)). In law, "that has committed some specified offense," late 13c. Of conscience, feelings, etc., 1590s. Meaning "person who is guilty" is from 1540s. To plead not guilty is from 15c.; to plead guilty is 19c., though, as OED notes, "Guilty is technically not a plea, but a confession." Related: Guiltily; guiltiness.
-ness
word-forming element denoting action, quality, or state, attached to an adjective or past participle to form an abstract noun, from Old English -nes(s), from Proto-Germanic *in-assu- (cognates: Old Saxon -nissi, Middle Dutch -nisse, Dutch -nis, Old High German -nissa, German -nis, Gothic -inassus), from *-in-, originally belonging to the noun stem, + *-assu-, abstract noun suffix, probably from the same root as Latin -tudo (see -tude).