The troops, with development workers, are mainly based in Uruzgan Province, training and mentoring units of the new Afghan Army.
Gillard, with British counterpart David Cameron and Canadian Prime Minister Stephen Harper, said a continued presence was needed to transform Afghanistan, underscored by the resurgence of polio and the impact of the war on its eradication.
The crippling disease remains endemic in Pakistan, Afghanistan, India and Nigeria, and Gillard announced new eradication funding of A$50 million ($61.6 million) during the Commonwealth Heads of Government Meeting.
Microsoft chief Bill Gates announced by video that a further US$40 million ($46.1 million) would be added by the Gates Foundation.
Cameron said polio was highly contagious and could spread back to countries in which it had been eradicated.
"Put simply, as long as one child remains at risk, all children remain at risk, and that isn't a risk we can take."
But Pakistan Prime Minister Yousaf Raza Gilani said the emergency action plan launched in Pakistan against the disease was being frustrated by militant resistance and cross-border movements from Afghanistan.
The position was fuelled by the continuing presence of 3.5 million refugees who had fled the invasion of Afghanistan by the former Soviet Union and by more than 2000km of indefensible border. Militancy was compounded by fundamentalism.
"The people who belong to those areas, they are true orthodox and so fanatic they don't let even the doctors to within those areas," Gilani said.
"We are trying our best, and we are taking the religious scholars on board to help us."
Cameron said Pakistan was Britain's biggest aid recipient and would be supported by its military and development efforts in Afghanistan.
"Obviously in Afghanistan we are supporting not just the British military presence; we're also supporting the governance in Afghanistan, and that includes the infrastructure needed to distribute vaccines."
Harper said Canada had an integrated approach between defence, development and diplomacy.
"One of the top priorities of that engagement has been polio eradication, notwithstanding, obviously, the difficulty of the security situation."