Like much of California's Central Valley, the surrounding land is extensively irrigated, using water from the California Aqueduct. The resulting wetlands, notably the Kesterson wildlife refuge, suffered from an accumulation of selenium due to agricultural irrigation runoff. Wildlife in this region suffered deformities, drawing the attention of news media and leading to the closure of the refuge.
As of the census2 of 2000, there are 4,698 people, 1,683 households, and 1,216 families residing in the city. The population density is 1,148.0/km² (2,970.5/mi²). There are 1,763 housing units at an average density of 430.8/km² (1,114.7/mi²). The racial makeup of the city is 72.26% White, 0.72% Black or African American, 0.98% Native American, 1.51% Asian, 0.06% Pacific Islander, 18.97% from other races, and 5.49% from two or more races. 35.08% of the population are Hispanic or Latino of any race.
There are 1,683 households out of which 36.2% have children under the age of 18 living with them, 56.3% are married couples living together, 11.8% have a female householder with no husband present, and 27.7% are non-families. 24.7% of all households are made up of individuals and 15.0% have someone living alone who is 65 years of age or older. The average household size is 2.79 and the average family size is 3.34.
In the city the population is spread out with 30.2% under the age of 18, 8.2% from 18 to 24, 25.6% from 25 to 44, 20.0% from 45 to 64, and 15.9% who are 65 years of age or older. The median age is 35 years. For every 100 females there are 94.9 males. For every 100 females age 18 and over, there are 88.8 males.
The median income for a household in the city is $38,824, and the median income for a family is $45,583. Males have a median income of $35,920 versus $22,149 for females. The per capita income for the city is $16,821. 16.9% of the population and 11.5% of families are below the poverty line. Out of the total population, 22.5% of those under the age of 18 and 15.4% of those 65 and older are living below the poverty line.
Much of the town's income traditionally comes from dairy production and processing: Gustine is the home of a Beatrice cheese factory and formerly a Carnation processing plant. As agricultural land becomes covered by housing developments, Gustine is becoming a bedroom community to the San Francisco bay area, a 1.5 hour commute away.