Texas Attorney General Greg Abbott said he'd appeal the ruling, which he labeled an attempt to strike down the ban approved by voters in 2005.
"The laws and constitution of the State of Texas define marriage as an institution involving one man and one woman," Abbott said in a written statement. "Today's ruling purports to strike down that constitutional definition – despite the fact that it was recently adopted by 75 percent of Texas voters."
Abbott has argued that because the state doesn't recognize gay marriage, its courts can't dissolve one through divorce.
District Judge Tena Callahan's ruled Thursday, however, that the court "has jurisdiction to hear a suit for divorce filed by persons legally married in another jurisdiction."
Jennifer Pizer, marriage project director for the New York-based gay rights group Lambda Legal, said it is too early to predict the ultimate implications of the lawsuit, in which neither man is identified.
But Cathy Adams, president of the conservative Texas Eagle Forum, characterized the decision as a judicial overreach.
"Judicial activism is what they're after, and it sounds as if they found someone in Dallas to participate in their endeavor," she said. "The people of Texas have spoken very strongly in opposition to same-sex marriage."
Peter Schulte, an attorney for the man who filed for divorce, told The Dallas Morning News that he and his client are "ecstatic" over the court's ruling. Schulte said the decision was a surprise, and that he hoped to have the judge sign a divorce order in a few weeks.
Gov. Rick Perry said state lawmakers and voters have repeatedly affirmed marriage as being between a man and a woman.
"I believe the ruling is flawed and should be appealed," Perry said.
Sen. Kay Bailey Hutchison, R-Texas, said she also supports Abbott's decision to appeal. Hutchison, who is challenging Perry in the GOP gubernatorial primary, said she has "consistently voted to preserve the sanctity of marriage and as governor I will continue to defend traditional marriage."
A phone message left by The Associated Press at court offices for Callahan was not immediately returned late Thursday. Callahan's ruling was first reported in The Dallas Morning News.
Pizer predicted an eventual end to bans on gay marriage in Texas and across the country.
"Most people do recognize that, eventually, American law will treat gays and lesbians the same as every other American," she said. "What we don't know is how may chapters that story will be."