Gravity got its start in the year 1881, following construction of the railroad through the territory. It was incorporated in 1883. The origin of the name "Gravity" is obscure.
As of the census of 2010, there were 188 people, 82 households, and 53 families living in the city. The population density was. There were 103 housing units at an average density of. The racial makeup of the city was 99.5% White and 0.5% from other races. Hispanic or Latino of any race were 1.1% of the population. There were 82 households, of which 28.0% had children under the age of 18 living with them, 50.0% were married couplesliving together, 11.0% had a female householder with no husband present, 3.7% had a male householder with no wife present, and 35.4% were non-families. 28.0% of all households were made up of individuals, and 9.8% had someone living alone who was 65 years of age or older. The average household size was 2.29 and the average family size was 2.68. The median age in the city was 42 years. 20.2% of residents were under the age of 18; 4.3% were between the ages of 18 and 24; 28.8% were from 25 to 44; 29.2% were from 45 to 64; and 17.6% were 65 years of age or older. The gender makeup of the city was 53.7% male and 46.3% female.
2000 census
As of the census of 2000, there were 218 people, 85 households, and 64 families living in the city. The population density was 729.6 people per square mile. There were 103 housing units at an average density of 344.7 per square mile. The racial makeup of the city was 99.08% White, 0.46% Pacific Islander, 0.46% from other races. Hispanic or Latino of any race were 3.21% of the population. There were 85 households, out of which 29.4% had children under the age of 18 living with them, 60.0% were married couples living together, 11.8% had a female householder with no husband present, and 24.7% were non-families. 22.4% of all households were made up of individuals, and 11.8% had someone living alone who was 65 years of age or older. The average household size was 2.56 and the average family size was 2.98. In the city, the population was spread out, with 28.0% under the age of 18, 5.0% from 18 to 24, 27.1% from 25 to 44, 20.6% from 45 to 64, and 19.3% who were 65 years of age or older. The median age was 38 years. For every 100 females, there were 111.7 males. For every 100 females age 18 and over, there were 98.7 males. The median income for a household in the city was $25,000, and the median income for a family was $30,000. Males had a median income of $25,625 versus $20,536 for females. The per capita income for the city was $13,312. About 16.2% of families and 18.1% of the population were below the poverty line, including 11.8% of those under the age of eighteen and 5.4% of those 65 or over.