Narrow hydrophobic regions are a common feature of biological channels, with possible roles in ion-channel gating. We study the principles that govern ion transport through narrow hydrophobic membrane pores by molecular dynamics simulation of model membranes formed of hexagonally packed carbon nanotubes. We focus on the factors that determine the energetics of ion translocation through such nonpolar nanopores and compare the resulting free-energy barriers for pores with different diameters corresponding to the gating regions in closed and open forms of potassium channels. Our model system also allows us to compare the results from molecular dynamics simulations directly to continuum electrostatics calculations. Both simulations and continuum calculations show that subnanometer wide pores pose a huge free-energy barrier for ions, but a small increase in the pore diameter to approximately 1 nm nearly eliminates that barrier. We also find that in those wider channels the ion mobility is comparable to that in the bulk phase. By calculating local electrostatic potentials, we show that the long range Coulomb interactions of ions are strongly screened in the wide water-filled channels. Whereas continuum calculations capture the overall energetics reasonably well, the local water structure, which is not accounted for in this model, leads to interesting effects such as the preference of hydrated ions to move along the pore wall rather than through the center of the pore.