A Welcome to toddlerhood. Perhaps the biggest challenge of the stage you are now entering is a child's steadfast insistence on doing things his way. Combine this with a limited capacity to understand the reasons for doing things your way, and you have some of the enormous frustration that comes with parenting a toddler.
When your son runs ahead, he's demonstrating other important developments as well. He's entering a stage in which psychological contact can do what physical contact once did. He can now turn around and look at you and feel safe, rather than needing to be held. It's hard for us as parents to adjust to the reduced need for physical closeness that comes with the end of babyhood and the beginning of toddlerhood. But try to see this as an advance, not as a loss of your baby or a loss of control. This is the time when you can take him to a fenced-in park and sit on a bench. He'll run away and play but will periodically check in. Some psychologists call this "refueling behavior" because the brief contact with Mom seems to feed the child for more of the independent exploration that's vital for his development.
So how, then, to manage? Your son absolutely can't see things your way, so the only way to make things easier is to try to see things his way. Furthermore, you know who the boss is, so there's no harm in letting him feel like he's in charge periodically. If you choose your battles, there will be a whole lot less of them.
That means finding places where he can run without holding your hand, such as the park or a quiet stretch of sidewalk. One way to allow him his independence is to give him concrete destinations. For example, you can say playfully, "Run to the mailbox and wait for me there," and then when you reach him, give him another destination. Having a little freedom will make the moments of restraint easier. Similarly, when you have to hold his hand, such as when you're crossing the street, you can let him know that he only has to hold on until he gets to the other side, and then he can be free again.
In general, try to give him a limited number of choices, even if they're meaningless to you (Should we cross at this corner or the next? Which hand do you want to hold?). Having a say will help him feel more in control, which will, believe it or not, make him more compliant. Just like the rest of us, your son will be more cooperative when he feels he has chosen what he's doing instead of being made to do it.