An inclusive search for anomalous production of two prompt, isolated muons with the same electric charge is presented. The search is performed in a data sample corresponding to 1.6 fb(-1) of integrated luminosity collected in 2011 at root s = 7 TeV with the ATLAS detector at the LHC. Muon pairs are selected by requiring two isolated muons of the same electric charge with p(T) > 20 GeV and vertical bar eta vertical bar < 2.5. Minimal requirements are placed on the rest of the event activity. The distribution of the invariant mass of the muon pair m(mu mu) is found to agree well with the background expectation. Upper limits on the cross section for anomalous production of two muons with the same electric charge are placed as a function of m(mu mu) within a fiducial region defined by the event selection. The fiducial cross-section limit constrains the like-sign top-quark pair-production cross section to be below 3.7 pb at 95% confidence level. The data are also analyzed to search for a narrow like-sign dimuon resonance as predicted for e. g. doubly charged Higgs bosons (H-+/-+/-). Assuming pair production of H-+/-+/- bosons and a branching ratio to muons of 100% (33%), this analysis excludes masses below 355 (244) GeV and 251 (209) GeV for H-+/-+/- bosons coupling to left-handed and right-handed fermions, respectively.