I think this is due to Shimura: "Abelian Varieties with Complex Multiplication and Modular Functions", http://press.princeton.edu/titles/6242.html
Edit: See also the link mentioned by nfdc23 in the comments to this response, http://math.stanford.edu/~conrad/vigregroup/vigre04/mainthm.pdf and http://jmilne.org/math/CourseNotes/cm.html.