You need 2 programs - called GCFScape and VTFEdit. (Google them) You also need a paint package capable of saving in TGA format.
GCFScape lets you extract textures (and indeed anything else too) from the Source GCF files. For a texture, there are two files. One is a VMT file and the other is a VTF file. Both are equally important, but for this particular process you only need the VTF file.
Then you can load the VTF into VTFEdit and export it from there to your favourite paint package, where you can edit it. When you're done editing, save the file as a TGA in your HL2 materials folder, and then use VTFedit to convert it back from the TGA to the VMT and VTF files.
You will then have a new texture. If you put the TGA directly into the HL2 materials folder and did the file conversion there, all you need to do is load Hammer and use your new texture.