I know that DNA is universal meaning that all organisms have the same 4 base pairs and also that the same codons code for the same amino acid in all organisms. What I am wondering is that say humans and bacteria and rats all have the same gene which codes for the same metabolic enzyme. Will the amino acid sequence of that protein enzyme also be the same in all three of those organisms? And that specific gene segment will also have the exact same base pair sequence in all three organisms too correct?
Before I go into answering your question, I just want to correct some mistake you have. Although DNA nucleotides (bases) are (almost) universal, the genetic code is not - there are organisms that use a slightly different genetic code. See here for example. Moreover, even the mitochondria in humans (and vertebrates in general) uses a slightly different code.
Now, to answer your question, it all comes down to evolution. Humans, rats and bacteria all have a common ancestor somewhere in our evolutionary past. Let's assume that this ancestor had some crucial and universally-useful gene. Since then, human+rat diversified from bacteria and then from each other, but all 3 species kept this gene, since its function was absolutely necessary. However, mutations were acquired along the way in each lineage. These mutations can be random and may not even have an effect on the amino acid results (synonymous), or they can be a result of natural selection and have an effect on the amino acid sequence (non-synonymous). In many cases, the different life styles and selective pressures acting on each species lead to rather different nucleotide and amino acid sequences. So to sum up, you can expect DNA, RNA and protein sequences to be different, although more similar between human and rat than bacteria.
In fact, the concept of the "same gene in different organisms" is somewhat wrong. As I explained, this is not the same gene, but you may say that it is homologous between the species, and more specifically orthologous.