I spent the past year gaining and losing the same five+ pounds over and over again. Very frustrating, but then it was quite a crazy year - moving, turmoil and all kinds of stuff going on.
Meanwhile, my husband put on some weight. He finally said it was bothering him when fall rolled around and he went to put on some jeans (instead of shorts on the weekend) and they didn't fit him all that comfortably. He was kind of shocked. He wears dress pants to work all week, and it was so hot over the summer that it was loose-fitting shorts on the weekends. Imagine his surprise when the jeans he'd worn for years didn't fit.
The first thing I suggested was daily weighing. Even if you don't have a plan yet in terms of food or exercise - the daily weighing helps you learn what normal daily variations are, and it will also help you stay somewhat in place (ie. not continue to gain). My husband used to weigh himself only very occasionally, and I think this is why the weight gain snuck up on him. The weekend summer shorts were a nice relaxed fit, and the dress pants are loose enough that you don't notice these things right away. Jeans are a little trickier - but then, he wasn't wearing jeans for several months there.
Daily weighing isn't meant to make you feel bad at all - it's just one little aspect, but I think it might help a lot.
Several years ago, I put on a whole lot of weight...and I can tell you for sure that I was *not* weighing myself at all back then. I just didn't want to know, and I didn't want to go there.
Hang in there - you won't keep gaining. No, not when you suddenly take notice like this. Even if it takes awhile to come up with a plan, and even if you don't "do" anything in particular right away, acknowledging what's going on makes a major difference.