It means that you were "very surprised".
To a native speaker it would never have the other meaning ("not much surprised"), it always has a clear meaning of 'X is very much the case' if you said 'to say that X is the case.. is somewhat of an understatement'.
"Somewhat/something of an understatement" expresses the meaning that: the statement ('I was surprised', in this case) would be an understatement of the full meaning, i.e. that the full meaning (being very surprised) is significantly "greater" than the one that was expressed (I was surprised). So if you just said you were 'surprised' it wouldn't convey how "exceptional" this situation is!
A couple of other examples:
I have been performing badly at my job, not meeting expectations, and thought I was about to be fired when my boss called me into a meeting. So to say that I was surprised when he said he was going to give me a promotion, is somewhat of an understatement! (Means I was very surprised to be given a promotion when the expectation was that my bosses didn't think highly of me.)
(Example stolen from Cambridge) "To say that they were lucky is somewhat of an understatement!" - meaning that they were VERY lucky because it would be an understatement to say that they were just 'lucky'. (In this case it's one thing to be 'lucky', it's quite another thing to be SO LUCKY that that thing happened!)