If the gelatin is prepared by the skin and bones of the animals that are halal to eat then there is no harm in using it. However, the gelatin in which any part of pig is mixed it should be avoided as the pig is impure with all its parts. And it is not proved yet that after putting the skin etc of pig the inversion of substance (tabdeel mahiyat) takes place which is a method of purifying. After all it is better to avoid it.
Allah knows Best!
Darul Uloom Deoband