We present photometric and spectroscopic observations at optical and near-infrared wavelengths of the nearby type Ic SN 2007gr. These represent the most extensive data-set to date of any supernova of this sub-type, with frequent coverage from shortly after discovery to more than one year post-explosion. We deduce a rise time to B-band maximum of 11.5 pm 2.7 days. We find a peak B-band magnitude of M_B=-16.8, and light curves which are remarkably similar to the so-called hypernova SN 2002ap. In contrast, the spectra of SNe 2007gr and 2002ap show marked differences, not least in their respective expansion velocities. We attribute these differences primarily to the density profiles of their progenitor stars at the time of explosion i.e. a more compact star for SN 2007gr compared to SN 2002ap. From the quasi-bolometric light curve of SN 2007gr, we estimate that 0.076 $pm$ 0.010 Msun of 56Ni was produced in the explosion. Our near-infrared (IR) spectra clearly show the onset and disappearance of the first overtone of carbon monoxide (CO) between ~70 to 175 days relative to B-band maximum. The detection of the CO molecule implies that ionised He was not microscopically mixed within the carbon/oxygen layers. From the optical spectra, near-IR light curves, and colour evolution, we find no evidence for dust condensation in the ejecta out to about 400 days. Given the combination of unprecedented temporal coverage, and high signal-to-noise data, we suggest that SN 2007gr could be used as a template object for supernovae of this sub-class.