We study the impact of gas accretion on the orbital evolution of black-hole binaries initially at large separation in the band of the planned Laser Interferometer Space Antenna (LISA). We focus on two sources: (i) stellar-origin black-hole binaries (SOBHBs) that can migrate from the LISA band to the band of ground-based gravitational-wave (GW) observatories within weeks/months; and (ii) intermediate-mass black-hole binaries (IMBHBs) in the LISA band only. Because of the large number of observable GW cycles, the phase evolution of these systems needs to be modeled to great accuracy to avoid biasing the estimation of the source parameters. Accretion affects the GW phase at negative (−4) post-Newtonian order, being thus dominant for binaries at large separations. Accretion at the Eddington or at super-Eddington rate will leave a detectable imprint on the dynamics of SOBHBs. For super-Eddington rates and a 10-years mission, a multiwavelength strategy with LISA and a groundbased interferometer can detect about 10 (a few) SOBHB events for which the accretion rate can be measured at 50% (10%) level. In all cases the sky position can be identified within much less than 0.4 deg 2 uncertainty. Likewise, accretion at 100% of the Eddington rate can be measured in IMBHBs up to redshift z ≈ 0.1, and the position of these sources can be identified within less than 0.01 deg 2 uncertainty. Altogether, a detection of SOBHBs or IMBHBs would allow for targeted searches of electromagnetic counterparts to black-hole mergers in gas-rich environments with future X-ray detectors (such as Athena) and/or radio observatories (such as SKA).