We initiated long-term optical interferometry monitoring of the diameters of unstable yellow hypergiants (YHG) with the goal of detecting both the long-term evolution of their radius and shorter term formation related to large mass-loss events. We observed HR5171 A with AMBER/VLTI. We also examined archival photometric data in the visual and near-IR spanning more than 60 years, as well as sparse spectroscopic data. HR5171A exhibits a complex appearance. Our AMBER data reveal a surprisingly large star for a YHG R*=1315+/-260Rsun (~6.1AU) at the distance of 3.6+/-0.5kpc. The source is surrounded by an extended nebulosity, and these data also show a large level of asymmetry in the brightness distribution of the system, which we attribute to a newly discovered companion star located in front of the primary star. The companions signature is also detected in the visual photometry, which indicates an orbital period of Porb=1304+/-6d. Modeling the light curve with the NIGHTFALL program provides clear evidence that the system is a contact or possibly over-contact eclipsing binary. A total current system mass of 39^{+40}_{-22} solar mass and a high mass ratio q>10 is inferred for the system. The low-mass companion of HR5171 A is very close to the primary star that is embedded within its dense wind. Tight constraints on the inclination and vsini of the primary are lacking, which prevents us from determining its influence precisely on the mass-loss phenomenon, but the system is probably experiencing a wind Roche-Lobe overflow. Depending on the amount of angular momentum that can be transferred to the stellar envelope, HR5171 A may become a fast-rotating B[e]/Luminous Blue Variable (LBV)/Wolf-Rayet star. In any case, HR5171 A highlights the possible importance of binaries for interpreting the unstable YHGs and for massive star evolution in general.