In this sentence, you would normally write a comma:
Saying this, he hurt her and she ran off.
The sentence means "While saying this, he hurt her and then she ran off" or "Just after he said this, he hurt her and then she ran off" or "He said this, which hurt her, and then she ran off." Context would be needed to figure out which interpretation is most reasonable.
Saying here is a present participle. It modifies he. However, saying this follows the typical pattern of an absolute construction, which is a participle clause that doesn't modify anything in the main part of the sentence. So, a reader is likely to interpret it according to the conventions for absolute constructions even though technically that's not what it is. According to those conventions, saying this describes a condition that enabled, just happened previously, happened while the main verb was happening, and/or explained the action described by the main verb of the sentence.
He hurt her by saying this and she ran off.
Here, saying functions as a gerund. Saying this functions as a noun phrase, which is the object of by. It names the action by which he hurt her.
Note that the -ing form of verbs is sometimes hard to pin down as gerund or present participle. These are grammatical concepts borrowed from other languages, which don't always map well to English grammar. I think the above analyses are pretty much required, but I'm sure someone could reasonably argue for a different analysis. I think the wisest approach is to see these things in terms of phrases whose structure echoes other, familiar phrases and consequently invites interpretation according to the familiar phrase patterns—sometimes according to more than one pattern at a time. This keeps you out of terminological quandaries and focuses you on how a fluent speaker attaches a meaning to the sentence, even when there's no standard grammatical term for it.