When a gentlemen meets a lady in the street, he should tip his hat, which means to take it by the forward brim and lift it slightly, or even imperceptibly, off his forehead, and then allow it to return to its normal location.
Originally, the hat would have been completely removed and in one single sweeping flourish, have been crossed across his abdomen or extended toward the ground, as he bowed deeply before the lady.
We don't tend to bow, now. And don't tend to wear hats, either. So both these practices are lost to antiquity.
The expression is more usual as "tip his hat TO the lady" rather than "at" her. It is not something you do "at" her, but rather in respect TO what she is (a lady).