Using a template-stripping method, macroscopic gold surfaces with root-mean-square (rms) roughness less than 0.4 nm have been prepared, making them useful for studies of surface interactions in the nanometer range. The utility of such substrates is demonstrated by measurements of the Casimir force at surface separations between 20 and 100 nm, resulting in good agreement with theory. The significance and quantification of this agreement is addressed, as well as some methodological aspects regarding the measurement of the Casimir force with high accuracy