Have you got all the drivers etc for the joystick and is it working with any other games? I found this on the Steam support site, I know it's for a an xbox360 controller but it has all the joystick support etc. You just copy and paste the text into your .cfg file on the hardrive and then enable joystick in the options of HL2, good luck. btw Make sure that you back-up the .cfg file BEFORE you start to play around with it, just in case.
EDIT: After digging around the world wide web the common theme with joysticks with HL2 is to make sure that they are enabled in your .cfg file. Joystick support should be set to 1.