We present an optical photometric and spectroscopic study of the very luminous type IIn SN 2006gy for a time period spanning more than one year. In photometry, a broad, bright (M_R~-21.7) peak characterizes all BVRI light curves. Afterwards, a rapid luminosity fading is followed by a phase of slow luminosity decline between day ~170 and ~237. At late phases (>237 days), because of the large luminosity drop (>3 mag), only upper visibility limits are obtained in the B, R and I bands. In the near-infrared, two K-band detections on days 411 and 510 open new issues about dust formation or IR echoes scenarios. At all epochs the spectra are characterized by the absence of broad P-Cygni profiles and a multicomponent Halpha profile, which are the typical signatures of type IIn SNe. After maximum, spectroscopic and photometric similarities are found between SN 2006gy and bright, interaction-dominated SNe (e.g. SN 1997cy, SN 1999E and SN 2002ic). This suggests that ejecta-CSM interaction plays a key role in SN 2006gy about 6 to 8 months after maximum, sustaining the late-time-light curve. Alternatively, the late luminosity may be related to the radioactive decay of ~3M_sun of 56Ni. Models of the light curve in the first 170 days suggest that the progenitor was a compact star (R~6-8 10^(12)cm, M_ej~5-14M_sun), and that the SN ejecta collided with massive (6-10M_sun), opaque clumps of previously ejected material. These clumps do not completely obscure the SN photosphere, so that at its peak the luminosity is due both to the decay of 56Ni and to interaction with CSM. A supermassive star is not required to explain the observational data, nor is an extra-ordinarily large explosion energy.