Justice Robert Hulme in the New South Wales Supreme Court ruled that Jocelyn Edwards was entitled to use the sperm.
It had been extracted posthumously from her husband, Mark Edwards, after he died in an accident at work.
The case was a landmark in a state where IVF treatment is banned without the consent of the donor.
Ms Edwards will need to move to another state to have the sperm inseminated.
"It's the right decision. Mark would be so happy, we're going to have our baby. That's what I plan to do," she said outside the court.
"I just want to get past today, enjoy the moment. It's been a long, long, long, difficult time," she added.
Ms Edwards, 40, married her husband in 2005; the couple began discussing the use of fertility treatment and assisted reproductive technology after she failed to get pregnant.
They had attended a clinic in early August 2010 and conducted tests, expressing their desire to try in-vitro fertilisation (IVF).
The day before their next appointment, Mr Edwards was fatally injured.
Ms Edwards asked for and got legal permission to extract sperm from her husband posthumously.
This has been held at a laboratory pending the court case.
"Although there is no direct evidence, the clear and only inference is that she desires to have a child with the aid of assisted reproductive treatment," the judge said.
Justice Hulme said the choice was either to destroy the sperm or give it to Ms Edwards and he ruled in her favour as the administrator of her late husband's estate.
An Australian woman who had discussed fertility treatments with her husband before he died has been allowed by a court to use his frozen sperm for IVF.