It appears to me that some Jews try to avoid shaking hands (same gender handshake) and I vaguely remember hearing that some Hassidic sects frown upon the concept of shaking hands as a form of greeting. Can someone else clarify this for me? Is there really some sort of Jewish custom to avoid handshaking? Is it based on any particular halacha? Is it because it's considered a gentile custom?
See Dinonline where they discuss the question of shaking hands with the opposite gender. In the course of the answer, they quote sources which assume there is no question of shaking the hands of the same gender:
The Ben Ish Chai (Od Yosef Hai, Shofetim 22) records the European practice of tightly grasping the hands of the host and hostess upon arriving in a person’s home, and states that because this expresses mutual feelings of friendship and affection, it is considered derech chibah and is forbidden...From Sefer Chassidim (1090), which is quoted by the Ben Ish Chai, it is clear that this will apply even when both parties are wearing gloves.
Seemingly, there wouldn't be a halachic reason in "ultra-orthodox" circles to avoid shaking hands with the same gender as the seforim view handshakes as a form of friendship. Nonetheless, this is interesting to note within the context of not shaking hands with the opposite gender:
This concept is also evidenced with regards to touching someone (even of the same gender) for whom one has a great deal of respect. For that reason, when the late Rebbe of Chabad was alive, his followers did not shake his hand.
Perhaps some of the Chassidim you notice are following similar lines as a sign of respect towards one another or they might just be following their own cultural custom which I personally see with some of my friends from chassidish circles. At the same time, other friends from the same circles who seem to be more outgoing are not shy when extending their hands.