Due to the severe speckle noise and complex local deformation in synthetic aperture radar (SAR) images, the problem of high-precision pixelwise registration (dense registration) between SAR and optical images remains far from resolved. In this paper, an attention-mechanism-based optical flow fusion algorithm is proposed to achieve high-precision dense SAR-optical image registration. First, two descriptors, the scale-invariant feature transform (SIFT) and a descriptor based on phase congruency (PC), are used to describe SAR and optical images to eliminate their intensity differences. Then, the saliency feature map is extracted as a query matrix to weight the optical flow energy function. When extracting the saliency feature map, the Contour Robuste d'Ordre Non Entier (CRONE) and the ratio of exponentially weighted averages (ROEWA) operator are used to eliminate additive and multiplicative noise in the optical and SAR images, respectively. Finally, the optical flow fields based on SIFT and the PC-based descriptor are fused to compensate for registration ambiguity. Experimental results show that our method is feasible, effective and robust to noise, it enables high-precision registration under local deformation.