Calcium ions and bacterial transformation
DNA has an overall negative charge. The phosphate heads of the lipid molecules that make up the cell membrane, along with the LPS molecules on the outer membrane, are also negatively charged. This means the plasmid is normally repelled by the cell membrane.
What Ca2+ ions do is shield the negative charges on each side, making the overall situation electrostatically neutral.
This site has a nice animatic for this process: http://www.dnai.org/b/index.html