An immediate consequence, and be confident and forceful in it.
If he's watching TV, turn the TV off and take him out of the room for a few minutes. When you return, engage him in another activity instead of turning the TV back on. (But if he's watching TV why is he suddenly deciding to get up and run at the dog?!)
You say he likes walking and holding the dog's lead. Take the pushchair out with you every time you go out (until this behaviour is sorted) and if he hurts the dog he goes straight back into the pushchair. Tell him, you scared the dog so you can not walk with him.
When you remove him, of course he will kick and scream and try to get back to the dog. Be strict, forceful, show him that you are in control of this situation, not him - he is 2.5, you are the parent. You say he can open a stair gate to come back - you need to remove him and stay with him until he calms down.
Under no circumstances does he go straight back to the dog after he has scared it!
Another consequence might be that he doesn't get a treat he was expecting that day. That needs to be done close to the event at his age otherwise the effect is lost.
Another consequence is that he doesn't see your mum's dog for a while. You can tell him, you cannot see grandma's dog/our chickens until you are kind to our dog. Nor does he go to the petting zoo or near your chickens.
Talk to him a lot about kindness and how to treat animals. "What is a nice way to stroke a dog?" "How do we make dogs happy?" "What is a dog scared of?"
You say in another update that you don't want to let rip at him. Not raising your voice makes it difficult to distinguish that you are telling him off. How is he supposed to recognise the change in tone of the situation? You need to find an effective way of emphasising yourself in language and behaviour. You need to teach your child the difference between when you are talking, chatting, playing, and when you need them to pay attention immediately/when you need them to stop doing something immediately.
That he finds the reaction from your dog hysterical is worrying. You need to nip his reaction in the bud as soon as it happens with your own reaction. Otherwise he is going to grow up to be the boy who enjoys picking on and bullying others.