Gram staining is a histochemical process which stains some bacteria blue (Gram positive) and others red (Gram negative). This helps in the identification of the organism, and thereby the choice of drugs.
In Gram positive bacteria, the cell wall has relatively simple structure (generally no protein), but is thick, and sensitive to changes in its integrity. Because it has a negative charge, it favors penetration of positively-charged compounds, such as streptomycin, into the cell.
In Gram negative bacteria, there is a thinner, but much more complex cell wall that is not as sensitive to cell-wall damage. The outer layer contains proteins, including endotoxins, porins through which hydrophilic antibiotics can move freely, and efflux transport proteins, which confer drug resistance. Many antibiotics have trouble penetrating this layer, including Penicillin G, methicillin, and others. This is due mainly to lipopolysaccharide layer.