Police identified the gunman only as a “young, white male” but US media named him as Devin Patrick Kelley, 26.
Kelley is reported to have been discharged from the US air force in 2014 following a court martial for assaulting his wife and child.
The motive for the killings is not yet clear.
Owen Amos, BBC News, Sutherland Springs, Texas
At 1.30, Chris Speer was still sitting on his porch in Sutherland Springs, sucking his cigarette in the dark. Fourteen hours earlier he was in the same place, with his 11-month-old son, when he heard “close to 30 shots”.
“Your first instinct, you’re out in the country, you think someone is shooting, practising,” he says. “But it was too close. I knew something wasn’t right.”
He took his son inside. “If I could have got my gun, I would have,” he says. “But when you’ve got a kid in your hands, I’m not risking it. He wouldn’t let go.”
Chris didn’t know the attacker but he knew “a lot” of the victims. “We’re a small community. We band together. But what doesn’t kill us makes us stronger.”
Texas Department of Public Safety regional director Freeman Martin said the attacker, dressed all in black and wearing a bulletproof vest, opened fire with a Ruger assault rifle outside the church at around 11:30 local time (17:30 GMT) and then went inside.
Mr Martin added: “We have multiple crime scenes. We have the church, outside the church. We have where the suspect’s vehicle was located.”
Governor Greg Abbott, confirming the death toll, said it was the worst mass shooting in the history of Texas.
“This will be a long, suffering mourning for those in pain,” he said at a news conference on Sunday.
Meanwhile, President Donald Trump, on a tour of Asia, said guns were not to blame for the shooting.
“We have a lot of mental health problems in our country, but this isn’t a guns situation,” he said.
The First Baptist Church’s pastor, Frank Pomeroy, told ABC News that his 14-year-old daughter, Annabelle, was among those killed.
Mr Pomeroy, who was in Oklahoma at the time of the attack, described her as “one very beautiful, special child” in a phone call to the television outlet.
At least 10 victims, including four children, were being treated at the University Health System in nearby San Antonio, the hospital said in a tweet.
Sheriff Joe Tackitt said authorities could not confirm the names of any victims yet as they continued to work through the crime scene.
Officials said 23 people were found dead inside the church while two people were fatally shot outside. Another died in hospital, authorities said.
Sutherland Springs, which has a population of about 400, lies about 30 miles (50km) south-east of the city of San Antonio.
The shooting comes just a month after a gunman in Las Vegas opened fire on an outdoor music festival, killing 58 people and wounding hundreds in the deadliest mass shooting in recent US history.