From Geneva Smitherman, Black Talk: Words and Phrases from the Hood to the Amen Corner (1994):
GAME 1) A series of activities and maneuvers to achieve a goal. 2) A story or RAP for obtaining what you want, used for manipulative and deceptive purposes. 3) a style of carrying and expressing oneself that enables one to achieve a desired end; to lack this style is referred to as "not having any game." 4) Criminal activities.
The relevant definition above is the third one, a non-pejorative sense of having the capacity to do what one desires to do. The specifically sporting sense of the term seems to have emerged a bit later, but Smitherman offers a syntactically similar "got X" formulation in her entry for hops:
HOPS The ability to leap and jump high, especially in B-BALL. "That Brotha got good hops." Also springs (newer term); rise, sky (older terms).
An early example of "has no game"—perhaps in the sense of "lacks the necessary skills to achieve greatness"—appears in "You didn't learn this alphabet in school," in the Columbia [University, New York City] Spectator (April 17, 1991):
(Thanks for lasting. By the way, I really wrote the other article on this page with my name on it. I figured I might as well write one more real sports story before I leave. Until next week.) Also, one more note. Everyone should buy the hit new single from Delicious Vinyl, "Shake It," by the up-and-coming rap star, Jesse Jaymes. Too bad he has no game.
An example where "has game" means something like "has high-level skills" appears in "Entrapment avoids genre traps," in the [Boston College] Heights (May 4, 1999):
Although the age difference between Zeta-Jones and Connery is four decades, the two maintain a mutual respect amidst the discrepancies in age. Connery proves through his salty charm that he still has game, while Zeta-Jones is absultuely luminous and plays her role as an enthused rookie with refinement.
Explicit application of the phrase to athletic ability appears in Jeremy Sideris and Brittany McWilliams, From Grill to Dome: A Dictionary of African American Slang Words and Phrases (2005):
Got game: To possess the ability to persuade verbally; to navigate easily cultural mores, social hierarchies and system; to turn ambition into success; moxie; athletic prowess. [Internal cross references to other terms omitted.]
General (non-black) awareness of the expression, especially in its sporting sense, undoubtedly owes a great deal to Spike Lee's movie He Got Game (1998), which is about a phenomenal high school basketball player and his father, who is in prison for murdering his son's mother. Nevertheless, Lee didn't invent that sense of "got game." Here is an example of the phrase used in the narrow sense of possessing athletic prowess from Dominick Mastrangelo, "Teamwork is a novel idea for Mavs," in the [Fort Worth, Texas] Rambler (December 4, 1996):
In the near future, maybe one of the three "J's" ([Jamal] Mashburn, Jason Kidd, Jimmy Jackson) will have to be dealt, for the betterment of the team.
Whether it makes [coach Jim] Cleamons' job of playing pacifier any easier, that's in the future. For now, the [Dallas] Mavericks need to grow up and stop acting like they're 13-year olds on some asphalt court crying over who's got game.
The Rambler was (and may still be) the student newspaper of Texas Wesleyan University, a fair distance from Brooklyn, New York.
Also, from "Lads defeat Sam Houston and UT," in the [Houston, Texas] Rice [University] Thresher (October 31, 1997):
Two recent wins put the men's soccer club in a tie for first in the Southeast bracket of the Texas Collegiate Soccer League. Its 4-1-2 record qualified the team for the TCSL Championship Tournament this weekend in Austin.
"A&M, Baylor, UT, Tech—they ain't got no game." senior goal keeper Mike Tuckinan said. "After spanking UT last weekend, we rediscovered our passion for the game—there's not a team out there that we can't take."
Earlier still is this headline from the Indianapolis [Indiana] Recorder (June 10, 1995):
Merrillville native Lloyd McClendon still has game
To "have no game" is to lack the athletic ability, creativity, persuasiveness, dedication, moxie, or other crucial characteristic that would enable one to succeed in a particular endeavor. The expression "got no game" is a formulation of the same idea that seems especially associated with athleticism and that probably owes some of its popularity in general U.S. slang English to Spike Lee's 1998 movie, He Got Game. Both expressions evidently originated among African Americans.
The phrase "has no game" appears in a slang sense in a U.S. student newspaper in April 1991, seemingly in the sense of "has no special skills, abilities, or style"; and the phrase "has game" appears in the Indianapolis Recorder, an African American–focused newspaper, in June 1995 in the sense of "has valuable athletic talents."
I doubt that Donald Trump understands "had no game" in precisely the sense that Geneva Smitherman cites in her 1994 book Black Talk—namely, to have lacked "a style of carrying and expressing oneself that enables one to achieve a desired end." But that definition certainly makes sense in the context of his derisive Twitter comment about Hillary Clinton.