Shimano brifters are especially likely to gum up if not used for awhile. I run across this all the time.
The usual solution is to use a solvent like WD-40 to flush them out, and follow with a lubricant like Tri-Flow.
My method is to use one product only: CRC PowerLube in the red can. About $3 at auto parts stores. PowerLube has PTFE (Teflon), so it has lubricant as well as solvent properties.
Patience pays off here, because some shifters get really gummed up. Spray, let drain, work shifter in both directions, repeat. It can take me a good half hour just to get a shifter moving in one direction, and another half hour to get it fully functional. Don't give up, just keep at it.