bacteria were the earliest forms of prokaryotes (organisms that lack a cell nucleus), it is thought the first to evolve were the Gram +ve bacteria (these do not have a bacterial outer membrane), then the Gram -ves (which do have an outer membrane).
it is thought that the group of organisms classed in the domain Archaea evolved later and separately from bacteria and although they look like bacteria (particularly, Gram +ve bacteria), have different metabolic pathways and genes that are more similar to eukaryota.
the classification of archaea, and of prokaryotes in general, is a rapidly moving and contentious field.
it is thought the earliest prokaryotic organisms that evolved were related to the Gram-positive bacteria and that Archaea evolved from Gram-positive bacteria in response to the antibiotic selection pressure (from the antibiotics produced by Gram +ve bacteria).
the largest known bacteria is the Thiomargarita magnifica in mangroves in French Carribean, and which looks like a vermicelli noodle growing 1-2cm long (5000 x longer than most bacteria) and visible to the naked eye!! It has a genome of 12,000 genes - 3-4x that of most bacteria, and it stores 37,000 copies of its genome per mm - the largest number of any bacterial cell.
the following taxonomy is grouped into Phyla then: