The Morse potential is related to the anharmonicity involved in frequency calculations. I think you can implement the same in Gaussian by using the keyword FREQ=ANHARMONIC. It will give you a list of all the relevant frequencies that you would need for your analysis. Also, you should note that this analysis might not be available with some levels of theory, so you should do some research on it.
The answer is quite simple: First, you must note that the Morse potential of a pair of atoms is directly related to binding or cohesion energy (or dissociation energy) of a bond as a function of the displacement of one atom related to the another one. Keeping this in mind, for each fixed distance of the bond in question, you must calculate the total energy of your system once, by the adiabatic approximation, it is a function of the nuclei distances. In order to obtain the dissociation energies, you also must calculate the total energy of each single atom involved, and then obtain the cohesion energy for each bond distance by subtracting the total energy of the system with the total energy of the atoms in question. Finally, with the obtained cohesion data, you must obtain the Morse potential parameters by their least squares fit. This methodology works well no matter the software you use.
Here R is the internuclear separation, the independent variable.
D is the well depth, i.e. the classical dissociation energy.
Re is the equilibrium separation.
a is a parameter related to the curvature of the potential well. By taking the second derivative of the potential and evaluating at R = Re,
k = 2Da^2.
Since the force constant (k) is related to the vibrational frequency (w) and reduced mass (m) by,
w = (k/m)^(1/2)
It follows that,
a = w(m/2D)^(1/2)
To find the Morse potential, you therefore need to know, Re, D, w and m. These values are often accessible experimentally, but if you seek to obtain the Morse potential from electronic structure calculations that’s possible also. Re can be found by sampling the PEC in the vicinity of the minimum. (A good approach is to find three points near the minimum and interpolate with a parabola.) D can be found by comparing the energy of the system at Re to the sum of the energies of the isolated monomers. (caveat, be sure to consider BSSE.) Some electronic structure codes will calculate vibrational frequencies (w) directly, if not, it can be done by sampling the PEC near the minimum and applying finite differences. The reduced mass is determined from the masses of the monomers (m1 and m2) as m = m1*m2/(m1 + m2). (Some electronic structure codes will do this for you as well.)
A cautionary note: When attempting to find the Morse potential from experimental data, keep in mind that a measurement of the bond dissociation energy will produce the difference between dissociation and the lowest vibrational state. This means that it will exclude the zero point energy. D in the Morse form is the classical dissociation energy and should include the zero point energy.
Re: Atiya’s response: The Morse potential is anharmonic, but one does not need to compute the anharmonicity to find it.
Horacio’s response gives a good description of how to find D.
There are several points of view for your question. The Morse potential is a pair potential that could be fitted for each pair interaction in your system (Let's say an oxide compound MO, then Morse potential can be set for M-M, M-O and O-O interactions). You can get the values of D0 and Req (Morse parameters) for each pair from the potential that you can obtain from ab-initio calculations. Also, this is the way to fit the Morse functional form of the interatomic interactions, in the better way obtained from experiments or ab-initio calculations. However, it is always hard to get a best fitting by constraining some values of the Morse potential. Actually, we can fit the potential directly to the compound properties (elastic and defect properties, structural and polymorphs properties, charges, ...), which properties that can be determined by ab-initio calculations (surface energies, atomic charges, relaxations...).