A Gram stain is a type of test that helps tell whether bacteria causing an infection are Gram-positive or Gram-negative. This can help a doctor choose the right antibiotic to treat the infection.
The Gram stain is done by putting a special dye on the bacterial cells. Gram-positive bacteria retain the dye and turn a different color than Gram-negative bacteria do. Sometimes more testing is done after the Gram stain to identify the specific kind of bacteria and the antibiotics that can kill them.