Gill, a Bloomington emergency room physician, said he had received 15,507 votes to Goetten's 15,364 votes to win the Democratic nomination.
However, Goetten, who is Greene County state's attorney, said he was waiting for all the votes to be counted.
"Washington might tell us that our voices don't matter, but this campaign is about fixing Congress, and that's why every vote must be counted," Goetten said in a statement released at 11 a.m. "As a father, veteran and state's attorney, I always been inspired by the service and the Democratic values of hard work, fairness and a strong middle class. I am humbled by the strength of the grass-roots campaign we built together, and I believe we must wait until all votes are counted before declaring victory in this race."
Goetten spokesman Vlad Gutman said the campaign believes many ballots remain uncounted throughout the district, possibly including provisional, absentee and military ballots.
"We need to make sure we know exactly how the district came down," Gutman said. "We just don't know what happened."
Gutman pointed out that a number of counties, including Macoupin, had problems Tuesday with ballots that were too large to fit in the vote-counting machines.
"There were problems throughout the state with the ballot issue," he said. "We just want to see at the end of the day where all the votes land, get everything counted, and take a look at where we are at that point. We want to make sure we can let the process take its course."
Gill's apparent victory sets the stage for another battle with U.S. Rep. Tim Johnson of Urbana, who easily won the Republican primary from the 13th District. Gill has faced Johnson in three previous general elections, in 2004, 2006 and 2010; all of those were in the 15th Congressional District, which Johnson now represents. Both are running this year in the 13th District that was redrawn in the redistricting that followed the 2010 U.S. Census.
The newly redrawn 13th District sprawls across a wide swath of Central and Western Illinois, stretching from Bloomington on the north to Champaign-Urbana on the east, southward through Springfield to the St. Louis Metro East. It now includes part of Madison County, as well as all of Calhoun, Greene, Jersey and Macoupin counties.
"It was a long night, but now we move on to a new day and a better future for the people of Central and Southwest Illinois," Gill said.
"To Democrats across Central and Southwest Illinois, I enthusiastically and gratefully accept your nomination for Congress," he said.
Gill left no confusion about the tenor of the race and said he would run an aggressive campaign to unseat Johnson.
"The Wall Street money and the D.C. power brokers couldn't stop our citizen-powered campaign," Gill said. "Now, we need to stand united and focus all our energy on defeating 41-year politician Tim Johnson and finally cleaning up Congress. Let's grab a few hours sleep and get ready for the fight to put middle-class people first instead of Wall Street bankers."
Gill is an emergency room doctor. He never has been elected to public office.
Johnson is a six-term congressman.