The phrase “ace in the hole” can be used both figuratively and literally and the general usage of the phrase as an idiom relates to its literal use. In a literal sense, the phrase means that a person has an ace as his or her hole card in a game of poker. This is in reference to community card poker games in which each player is given one or more cards “in the hole” that are part of an incomplete hand, and uses a set of communal cards to complete a hand. An ace in the hole can also refer to a figurative advantage someone has that others are not aware of.
While the origins of the phrase “ace in the hole” are certainly from poker, there is little evidence to indicate when it came into broad use in a figurative sense. The exact meaning of the phrase depends on if it is being used literally or figuratively. Its literal usage, and origin, occurs in certain types of poker games. These are referred to as community card games, not because a community is playing the game, but because the players all utilize a community pool of cards to try to make the best hand possible.
Games like “Texas hold ‘em,” for example, are played with one or more cards being dealt to each player, but not enough to make a full hand. These cards are typically dealt face down, though they can be a combination of cards up and down, and the face down cards are called “the hole.” An ace in the hole, therefore, would be an ace card that someone had dealt to him or her face down, which only he or she would know about. Since the ace card is typically the highest card in games and is almost universally advantageous, then a player with an ace in the hole has a strong, secret advantage.
This term has been broadened in usage outside of poker, and someone can have an ace in the hole in many different ways. In general, however, it refers to an advantage someone has, which others are not aware of, much like the player with an ace other players cannot see. If two employees at a company are trying to get a major investor for that company, for example, and one employee is friends with the investor without the other employee knowing it, then he or she would have an ace in the hole.