The difference lies in the cell wall of the two types; Gram-positive bacteria have a high amount of peptidoglycan in their cell wall which the stain interacts with, while Gram-negative bacteria have a cell wall made primarily of lipopolysaccharide. The Gram-negative cell wall is similar to a cytoplasmic membrane, typically only a few layers thick and generally much thinner than Gram-positive types.
Many species of Gram-negative bacteria are pathogenic. This pathogenic capability is usually associated with certain components of their cell walls, particularly the lipopolysaccharide (endotoxin) layer.