We have observed four red clump stars in the very old and metal-rich open cluster NGC 6791 to derive its metallicity, using the high resolution spectrograph SARG mounted on the TNG. Using a spectrum synthesis technique we obtain an average value of [Fe/H] = +0.47 (+/- 0.04, rms=0.08) dex. Our method was tested on mu Leo, a well studied metal-rich field giant. We also derive average oxygen and carbon abundances for NGC 6791 from synthesis of [O I] at 6300 A and C_2 at 5086 A, finding [O/Fe] =~ -0.3 and [C/Fe] =~ -0.2.