The first measurement of vector-boson production associated with a top quark-antiquark pair in proton-proton collisions at sqrt[s] = 7 TeV is presented. The results are based on a data set corresponding to an integrated luminosity of 5.0 fb(-1), recorded by the CMS detector at the LHC in 2011. The measurement is performed in two independent channels through a trilepton analysis of ttZ events and a same-sign dilepton analysis of ttV (V = W or Z) events. In the trilepton channel a direct measurement of the ttZ cross section σ(ttZ) = 0.28(-0.11)(+0.14) (stat)(-0.03)(+0.06) (syst) pb is obtained. In the dilepton channel a measurement of the ttV cross section yields σ(ttV) = 0.43(-0.15)(+0.17) (stat)(-0.07)(+0.09) (syst) pb. These measurements have a significance, respectively, of 3.3 and 3.0 standard deviations from the background hypotheses and are compatible, within uncertainties, with the corresponding next-to-leading order predictions of 0.137(-0.016)(+0.012) and 0.306(-0.053)(+0.031) pb.