"I have more work to do on my recovery, so to do what is best for Arizona I will step down this week," Giffords said, posting the announcement on social media like Twitter, Facebook, and YouTube. (see video below)
"I'm getting better. Every day my spirit is high. I will return and we will work together for Arizona and this great country. Thank you very much," she added.
Obama said Giffords represents the very best of what public service should be and that her "cheerful presence" would be missed in Washington.
"She's universally admired for qualities that transcend party or ideology - a dedication to fairness, a willingness to listen to different ideas, and a tireless commitment to the work of perfecting our union," Obama said in a statement.
"We know it is with the best interests of her constituents in mind that Gabby has made the tough decision to step down from Congress," Obama said.
Brewer said Arizona law required her to hold a special election to determine Giffords' replacement.
"Her grit and determination continue to inspire," Brewer said in a statement on Facebook.
Giffords was shot through the head on Jan. 8, 2011, when a gunman opened fire at a congressional outreach meeting in Tucson, killing six people and wounding 12. Giffords' office said she would meet privately with some of the people who attended that event before leaving office.
"We salute Rep. Giffords for her service, & for the courage & perseverance she has shown in the face of tragedy. She will be missed," Boehner, a Republican, said in a comment on Twitter.
House Minority Leader Nancy Pelosi hailed Giffords as a "bright star" and "a dynamic and creative public servant," in a statement released on Sunday. "Gabby's message of bipartisanship and civility is one that all in Washington and the nation should honor and emulate.
"She will be missed in the House of Representatives, but her legacy in the Congress and her leadership for our nation will certainly continue," she added.
Jared Loughner, a 23-year-old college dropout, was charged with attempting to assassinate Giffords and other crimes. He pleaded not guilty and was found unfit to stand trial.
An hour after Giffords posted the announcement, her Facebook page had received over 1,000 comments, with most thanking Giffords for her service and offering good wishes. Many well-wishers said they hoped Giffords would run for political office in the future.
Giffords was seen as a rising political star, one of a few Democrats to survive the Republican sweep of swing districts in the November 2010 elections.
Following intensive physical therapy, Giffords is recovering from the traumatic brain injury she sustained in the shooting. But there were moments in the YouTube video on Sunday where she seemed to struggle for words.
In May, she traveled to Florida, where she watched her husband command the Endeavour as it blasted off for the penultimate flight of the NASA shuttle program. (Reporting By Tim Gaynor; Additional reporting by Andrea Shalal-Esa in Washington and Mary Slosson in Los Angeles.; Editing by Stacey Joyce and Cynthia Osterman)