Fortunately it's been a while since I had to either drive or ride in Manhattan. But my recollection is that there were quite a few areas with so many double and triple-parked vehicles that squeezing by them when possible was routine for both drivers and cyclists and sometimes necessary to avoid gridlock. Motorists would watch for any movement by the vehicle being passed and quickly beep the horn when needed and it seems likely to me that the hand slap was meant to convey the same message.