Gillard said Australia "firmly supports" the international strategy agreed upon in Lisbon last year, which sees the start of handing back military control to Afghan forces this year, and handing over full control by 2014. She agreed that Afghan forces have a role to play, but also said allies must be "very realistic about Afghanistan's future."
"Afghanistan must never again be a safe haven for terrorism," she warned.
At the same time, she said Australia believes the "right strategy" is in place, and praised U.S. Gen. David Petraeus, who commands NATO forces in Afghanistan, as a "resolute and courageous commander. "I am cautiously encouraged by what I have seen," she said.
More generally, Gillard told the joint session that Australia remains a staunch ally of the United States.
"You have a true friend Down Under," Gillard said in her well-attended speech. "You have an ally in Australia. An ally for war and peace. An ally for hardship and prosperity. An ally for the 60 years past, and Australia is also an ally for all of the years to come."
Gillard singled out Ronald Reagan as a "great symbol" of American optimism. "The only greater symbol of American optimism is America itself," she said to applause.
Gillard also talked fondly of her memories of watching the moon landing decades ago, and said she still sees in America a nation capable of changing the world.
"I firmly believe you are the same people who amazed me when I was a schoolgirl by landing on the moon," she said in closing. "On that great day, I believed Americans could do anything. I believe that still. You can do anything."
-- This story was updated at 11:48 a.m.