The electrical resistivity log has proven to be a powerful tool for lithology discrimination, correlation, porosity evaluation, hydrocarbon indication, and calculation of water saturation. Carbonate rocks develop a variety of pore types that can span several orders of magnitude in size and complexity. A link between the electrical resistivity and the carbonate pore structure has been inferred, although no detailed understanding of this relationship exists. Seventy-one plugs from outcrops and boreholes of carbonates from five different areas and ages were measured for electrical resistivity properties and quantitatively analyzed for pore structure using digital image analysis from thin sections. The analysis shows that in addition to porosity, the combined effect of microporosity, pore network complexity, pore size of the macropores, and absolute number of pores are all influential for the flow of electric charge. Samples with small pores and an intricate pore network have a low cementation factor, whereas samples with large pores and a simple pore network have high values for cementation factor. Samples with separate-vug porosity have the highest cementation factor. The results reveal that (1) in carbonate rocks, both pore structure and the absolute number of pores (and pore connections) seem more important in controlling the electrical resistivity, instead of the size of the pore throats, as suggested by previous modeling studies; (2) samples with high resistivity can have high permeability; large simple pores facilitate flow of fluid, but fewer numbers of pores limit the flow of electric charge; and (3) pore-structure characteristics can be estimated from electrical resistivity data and used to improve permeability estimates and refine calculations of water saturation.