A precise measurement of the cross section for the process e +e-→K+K-(γ) from threshold to an energy of 5 GeV is obtained with the initial-state radiation (ISR) method using 232 fb-1 of data collected with the BABAR detector at e+e- center-of-mass energies near 10.6 GeV. The measurement uses the effective ISR luminosity determined from the e +e-→μ+μ-(γ) γISR process with the same data set. The corresponding lowest-order contribution to the hadronic vacuum polarization term in the muon magnetic anomaly is found to be aμKK,LO=(22.93±0.18 stat±0.22syst)×10-10. The charged kaon form factor is extracted and compared to previous results. Its magnitude at large energy significantly exceeds the asymptotic QCD prediction, while the measured slope is consistent with the prediction. © 2013 American Physical Society.