DO shift BEFORE it gets difficult.
If you have a moderately recent road bike you have a pretty broad selection of gears just 1-2 teeth from each other. I shift down one or two gears at the time, as soon as there is any resistance. I keep my cadence relatively high through the hill. Of course I still might be passed in the end by strong cyclists, but the idea is not to loose momentum, and to avoid loosing speed quickly (which will definitely happen if you wait until it's hard to shift down).
Good luck!!