There are several factors in the retirement of the legendary F-14, and no, the movie 'Top Gun' did little to help its fate. Most people are under the impression that the F-14 was retired due to age-related maintenance issue and the progress of technology. Those are very valid reasons but they are applicable to all aircrafts, not just the F-14.
To have a better understanding of the reasons behind the F-14's retirement, there has to be an understanding of force projection doctrine and the role of the USN in this doctrine. Take a look at past aircraft complement of a nuclear aicraft carrier (CVN) and it is obvious -- logistics. The greater the speciation of the deployed force, the greater the stress on the logistics to keep this force in combat status. Speciation means specialization and we have F-14s for fleet defense, F-18 for intermediate range fleet defense and ground strikes, A-6 for electronics warfare, and finally E-2 for airborne radar coverage.