The Phrase Finder says:
The origin of the phrase goes back to the days of traveling circuses. Small ones with no major acts and no menagerie of exotic animals were derided as being dog and pony shows, since those were the major performers. To further denigrate the show, detractors would say that it had a one trick pony.
and
one-trick pony n phr by 1990s A person having a single accomplishment: "... as he proved during equisite ballads and mid-tempo tunes, he’s no one-trick pony"—Milwaukee Journal / "For years, Twentieth Century Fund has been known to investors as one-trick pony"—New York Times
(The poster noted that the entry "one-trick pony" comes from the Dictionary of American Slang, Third Edition (1995) by Robert L. Chapman )
gailr