There's nothing that I can find that specifically refers to any offence for allowing one's goats to roam free, but there are at least two national, and probably more at state / municipal level, laws that deal with obstructing the highway - therefore potentially making the goat owner liable for any injury or damage shown to be caused by their (in)action:
Punishment for mischief by injury to national highway.--
Whoever commits mischief by doing any act which renders or which he knows to be likely to render any national highway referred to in sub-section (1) of section 8A impassable or less safe for traveling or conveying property, shall be punished with imprisonment of either description for a term which may extend to five years, or with a fine, or with both.
Whoever, by doing any act, or by omitting to take order with any property in his possession or under his charge, causes danger, obstruction or injury to any person in any public way or public line of navigation, shall be punished, with fine which may extend to two hundred rupees.
There are also animal-welfare related laws to consider, such as:
Negligent conduct with respect to animal.
Whoever knowingly or negligently omits to take such order with any animal in his possession as is sufficient to guard against any probable danger to human life, or any probable danger of grievous hurt from such animal, shall be punished with imprisonment of either description for a term which may extend to six months, or with fine which may extend to one thousand rupees, or with both.
- Section 3 Prevention of Cruelty to Animals Act:
Duties of persons having charge of animals.
It shall be the duty of every person having the care or charge of any animal to take all reasonable measures to ensure the well-being of such animal and to prevent the infliction upon such animal of unnecessary pain or suffering.