Your saddle could possibly be too low or could be a matter of too low a cadence while climbing. I got caught out last year on a long steep climb that I just didn't have enough gear for. I was able to do it, but spent a lot of time at low cadence and by the end, my knee hurt exactly like you describe.
Got any pics of you on the bike?
Bob