"I will recover and will return," the Arizona Democrat said in a letter read aloud by her friend and colleague, Rep. Debbie Wasserman Schultz, who fought back tears.
A standing ovation roared across the House chamber for Giffords. Teary-eyed legislators from both parties applauded Giffords as she submitted her letter of resignation to House Speaker John Boehner, who also fought back tears.
House Minority Leader Nancy Pelosi called Giffords the "brightest star among us."
"She has brought the word 'dignity' to new heights by her courage," Pelosi said. "You will be missed in the House of Representatives."
Her husband, Mark Kelly, a former astronaut, and mother, Gloria, watched.
Giffords, 41, was severely injured by an assassin's bullet that tore through her skull last year in a shooting in Tucson, Arizona, that left six people dead, including a federal judge and a 9-year-old girl.
House Majority Leader Eric Cantor said Wednesday that "we are inspired, hopeful and blessed for the incredible progress that Gabby has made in her recovery." He called her "an inspiration to us and to all Americans."
House Democratic Whip Steny Hoyer added, "We've missed you. We are blessed in this house to be served by extraordinarily people, of which you are a perfect example."
Giffords sat in the front row between Wasserman Schultz, D-Florida, and Dave Schweikert, R-Arizona. As each lawmaker rose to pay tribute to her, she shifted in her seat, turned toward them and listened intently. After each speech, she stood, assisted by Wasserman Schultz and Schweikert. She raised her hand and pumped her fist in the air several times.
As Hoyer spoke about missing her, Giffords spoke up and said, "I miss you."
She held Wasserman Schultz's hand as Wasserman Schultz made her remarks.
With the help of an aide, Giffords made her way to Boehner to hand in her letter of resignation while the House speaker's face trembled. He grabbed her hand and raised it as the two received a standing ovation.
"The tragic January 8th shooting in Tucson took the lives of six beautiful Americans and wounded 13 others, me included," said the letter to Boehner. "Not a day goes by that I don't feel grief for the lives lost and so many others torn apart.
"Christina-Taylor Green, Dorothy Morris, John Roll, Phyllis Schneck, Dorwan Stoddard and Gabe Zimmerman embodied the best of America," the letter said. "Each died in their own way, they committed their lives to serving their families, community and country, and they died performing a basic but important act of citizenship that's at the heart of our greatness as a nation."
The three-term congresswoman cast her final vote on a bill that she and U.S.Rep. Jeff Flakeintroduced to try to crack down on illegal drug smuggling across the U.S. border. After casting her vote, Giffords looked up at the vote board in the chamber to see the green light next to her name.
The bill passed unanimously. After its passage, Giffords remained in the chamber as members lined up to say farewell, including former Rep. Gene Taylor, a Mississippi Democrat who lost in 2010. Taylor waited in line to hug Giffords.
As Giffords left the chamber, she ran into cloakroom attendant Ella Terry. Both women had tears on their faces as they embraced.
Giffords has made few public appearances since the shooting, but she cast a vote to raise the federal debt ceiling, and she also gave an interview to ABC's Diane Sawyer.
Her appearance Wednesday in the House was her second in two days. She received a 90-second standing ovation before President Barack Obama's State of the Union address on Tuesday night.
She has been undergoing intensive rehabilitation in Houston, according to her office.
Prosecutors accuse Jared Lee Loughner, 23, of carrying out the attack, which purportedly targeted Giffords during the constituent meet-and-greet event outside a supermarket.
Loughner could face the death penalty if convicted on charges of murdering six people -- including Roll, the chief federal judge of Arizona.
Loughner has been diagnosed as schizophrenic and has spent time on suicide watch while in custody. He is undergoing treatment in Springfield, Missouri.
Giffords' formal resignation, and her husband's apparent decision not to fill her seat, now makes the race in Arizona's 8th Congressional District largely up for grabs.
The remainder of Giffords' term is expected to be filled by the winner of a special election set by Gov. Jan Brewer, a Republican.