Precise optical properties of metals are very important for accurate prediction of the Casimir force acting between two metallic plates. Therefore we measured ellipsometrically the optical responses of Au films in a wide range of wavelengths from 0.14 mum to 33 mum. The films at various thickness were deposited at different conditions on silicon or mica substrates. Considerable variation of the frequency dependent dielectric function from sample to sample was found. Detailed analysis of the dielectric functions was performed to check the Kramers-Kronig consistency, and extract the Drude parameters of the films. It was found that the plasma frequency varies in the range from 6.8 eV to 8.4 eV. It is suggested that this variation is related with the film density. X-ray reflectivity measurements support qualitatively this conclusion. The Casimir force is evaluated for the dielectric functions corresponding to our samples, and for that typically used in the precise prediction of the force. The force for our films was found to be 5-14% smaller at a distance of 100 nm between the plates. Noise in the optical data is responsible for the force variation within 1%. It is concluded that prediction of the Casimir force between metals with a precision better than 10% must be based on the material optical response measured from visible to mid-infrared range.