We report on high-speed eclipse photometry of the dwarf nova V2051 Oph while it was in a low brightness state, at B ~ 16.2 mag. In comparison to the average IUE spectra, the ultraviolet continuum and emission lines appear reduced by factors of, respectively, ~4 and ~5. Flickering activity is mostly suppressed and the lightcurve shows the eclipse of a compact white dwarf at disc centre which contributes ~60 per cent of the total light at 3900--4300 A. We use measurements of contact phases in the eclipse lightcurve to derive the binary geometry and to estimate masses and relevant dimensions. We find a mass ratio of q= 0.19+/-0.03 and an inclination of i= 83+/-2 degrees. The masses of the component stars are M_1 = 0.78+/-0.06 M_dot and M_2 = 0.15+/-0.03 M_dot. Our photometric model predicts K_1 = 83+/-12 km/s and K_2= 435+/-11 km/s. The predicted value of K_1 is in accordance with the velocity amplitude obtained from the emission lines after a correction for asymmetric line emission in the disc is made (Watts et al. 1986). The secondary of V2051 Oph is significantly more massive than the secondaries of the other ultra-short period dwarf novae. V2051 Oph is probably a relatively young system, whose secondary star had not enough time to evolve out of thermal equilibrium.