The term gay bar, or in other forms of English gay pub is a term that describes a licensed venue serving alcohol that has, or seeks to attract, a predominantly gay clientele. The term lesbian bar may also be used where the target market of the venue is lesbian women.
Due to laws surrounding homosexuality, gay bars were initially often run illicitly in many places, as members of the gay community feared persecution, arrest or imprisonment. This situation has now changed in many countries, however in some countries, such as Saudi Arabia and Iran homosexuals can be subject to imprisonment or death, leading to gay bars and other meeting places remaining clandestine. Initially in various countries there were no gay bars as such, but rather various regular private gatherings of people who would meet as a social group, such as Sydney's long running gay community group The Boomerangs in private to socialize.
As the gay community slowly became more established, during the middle decades of the 20th century, entrepreneurial business people saw an opportunity to create venues that served what was by then a growing gay marketing opportunity. This was done illicitly at first by people such as Sydney's Dawn O'Donnell and later as social acceptance of homosexual people became more widespread, many pubs, clubs and bars that may have experienced declining business were converted into gay bars, often attracting a vastly increased number of patrons.
Some bars - such as the Stonewall Inn in New York City, scene of the infamous Stonewall riots that signalled the start of an increased radicalization of gay communities in many countries - operated openly as bars, but due to the nature of their operations, often with limited official approval, this led to alleged corruption in the form of payments to corrupt city personnel in order to keep trading. In the 1970s it became a common expression in places such as Australia, the United Kingdom and the USA to hear people refer to this transition in the marketing of a bar to be described as "The Exchange Hotel has gone gay."
In small towns there may be only one gay bar but it may serve as a place for gays and lesbians to meet and socialize safely, which remains difficult in many rural communities in many countries. Gay bars have remained popular although in some established gay locations, such as Sydney's Oxford street gay precinct, there has been a steady decline in their numbers and their patronage since the 1990s. Some attribute this to the increase in gay social networking that is now possible through the application of new technologies on the internet. Sites such as Gaydar and Facebook attract large numbers of gay users.
In 2007 a Melbourne gay bar, The Sir Robert Peel Hotel (known as The Peel), made headlines in world media for its win in a tribunal hearing that allowed it to legally refuse entry to heterosexuals or women if it chose to. The decision caused much debate in both the mainstream and the gay community. 
- The Kingdom in the Closet. May, 2007. Atlantic Monthly. Retrieved: August 1, 2007
- Taylor, Christian. Dawn O'Donnell - Rest In Peace, Same Same, 13 June 2007. Retrieved on 4 October 2013.
- 'Small Town Gay Bar' sheds light on intolerance. July 21, 2007. Boston Herald. Retrieved: August 1, 2007
- Aussie Gay Bar Enforces Gay Only. May 29, 2007. Gay Market News. Retrieved: August 1, 2007
- The bar where only gay men are allowed. May 29, 2007. Times Online. Retrieved: August 1, 2007