Robert Newman, 23, assaulted the animal in a barn in Devizes, Wiltshire in April.
Newman, of Potterne Road, Devizes, initially denied the charge but later changed his plea.
Newman was jailed for six weeks for the attack, which North West Wiltshire Magistrates' Court  heard had left the goat needing veterinary treatment.
At the time of the assault Newman was the subject of an eight week suspended sentence for a burglary in August last year.
Gail Chilcott, chair of the bench, activated the suspended sentence, which will run concurrently.
Anna Humphreys, prosecuting, read a victim impact statement on behalf of the goat's owner - who was not named in court.
It read: "This person has cost us a considerable amount of money because we have had to install security cameras.
"We have also had to pay for vet's fees and antibiotics for the injuries sustained by the goat."
In mitigation Anne Ellery told the court Newman's actions were a "symptom of isolation rather than depravity".
"His delay in admitting the behaviour is because of the embarrassment and shame that went with it," she added.
A man has been jailed after he admitted having sex with a goat.