Kelly, 30, narrowly lost to Giffords in 2010. A few months later, she was shot in the head outside a Tucson grocery store while greeting constituents. Barber also was wounded, along with 11 others. Six people were killed, including a federal judge.
When Giffords relinquished her seat earlier this year, she asked Barber to run in the special election.
Barber will hold the seat until the end of the year. In November, both parties will vie to win a full two-year term.
From the start, national political bosses from both parties poured money into the politically moderate Eighth District in an effort to influence the outcome. Republicans outspent Democrats more than 2-1, with much of the money paying for TV attack ads linking Barber to what the GOP called President Obama's failed economic policies.
"Ron Barber is helping Obama, but he is hurting Arizona," one ad asserted.
Democratic leaders say they need to gain 25 seats to wrest control of the House from Republicans.
Although Giffords' endorsement was thought to carry persuasive emotional wallop, Democratic strategists took nothing for granted. In the hours before polls opened, party loyalists were urged to call 10 friends each to persuade them to vote.
"We can't afford to lose Gabby's seat to a radical Republican who would go after everything that she stands for," read one release from the Barber camp.
Elsewhere, North Dakota voters resoundingly defeated an attempt to abolish the state's property taxes.
They also empowered the University of North Dakota to drop its Fighting Sioux mascot, which the National Collegiate Athletic Association and others have called offensive.