Why is the gear handle shaped the way it is?
It's required by law, at least in the US. 14 CFR 23.781, Cockpit control knob shape specifies these shapes for the flap and gear controls on smaller aircraft:



For larger (transport category) aircraft, 25.781 specifies the same thing:



As for why those shapes are specified, it's for at least two reasons:


The shape resembles the thing it controls, so it's an obvious memory aid
The controls are all shaped differently, therefore you can distinguish them by touch alone, without needing to look at them


As others have noted, there have been accidents in the past caused by pilots using the wrong controls, and this is one reason why the FAA decided to do something to standardize them. Parts 23 and 25 also state where the controls should be placed, for the same reason.

The FAA's Airplane Handbook says:


  There have been many cases of the pilot mistakenly grasping the wrong
  handle and retracting the landing gear, instead of the flaps, due to
  improper division of attention while the airplane was moving.


They recommend - and I was taught - leaving the flaps alone after landing until clear of the runway (unless you have a good reason for retracting them earlier, like a short-field landing), then check and retract them with the statement "flaps identified and retracted". "Identified" in this case simply means that you're sure you have the right control in your hand. Some instructors even avoid touch-and-goes in complex aircraft (i.e. with retractable gear) because they feel the risk of retracting the gear rather than the flaps during the maneuver is too high; they stop and go instead, even if that means taxiing back for takeoff.