Herein, a simple and accurate spectrophotometric method was developed to detect gatifloxacin (HGAT) in a pure and ophthalmic formulation. The method depends on complexation of HGAT with Co (II), Ni (II) and La(III) ions in ethanol medium at room temperature. The experimental conditions have been investigated to reach optimum conditions for HGAT-metal ions interaction, including detection of a suitable wavelength, medium pH, reaction time and reactants concentration. Moreover, the composition of these complexes in addition to their stability constants were also investigated and the result indicated that the molar ratio of HGAT: Metal ion is 1:1 for Ni (II) and La(III) ions and 1:2 for Co (II) ion. Beer's law plots were obeyed in the concentration ranges 18.77–150.16, 18.77–131.39 and 18.77–112.62 (μg mL
−1
) for Co(II), Ni(II) and La(III) ions interaction, respectively. The apparent molar absorptivity, Sandell's sensitivity, standard deviation, detection and quantification limits were calculated. The proposed method was successfully applied for the determination of HGAT in the bulk and ophthalmic formulation. The obtained results were compared statistically with other published methods and the results were in good agreement with those obtained by reported methods.