Gray County is a county located in the U.S. state of Texas. As of the 2020 census, its population was 21,227. The county seat is Pampa. The county was created in 1876 and later organized in 1902. Gray County is named for Peter W. Gray, a Confederate lawyer and soldier in the American Civil War.