Sounds like the scroll wheel encoder. I actually just had a similar issue on my G603, [guide|162191|here is the guide for that encoder replacement|new_window=true] so you can have and idea as to what this entails.
To figure out the exact part you need you may just need to disassemble your mouse and check the part for the wheel encoder. Here is a [guide|140809|disassembly guide for the G502 Hero|new_window=true]. You may even find that after taking it apart and cleaning it it works again! If not just search Ebay for that part and you should be able to find it.