Gram should be capitalized and never hyphenated when used as Gram stain; gram negative and gram positive should be lowercase and only hyphenated when used as a unit modifier.
Gram staining
gram negative
gram-positive bacteria
This is from the CDC Emerging Infectious Diseases Journal guidelines.