My standard rant about "what can we say about $G$": what we can say about $G$ is that the two partitions are the same. If the questioner doesn't find that a helpful answer then they might want to consider the possibility that they asked the wrong question ;-)
But as to the actual question: "is $G$ forced to be abelian?", the answer is no, and I discovered this by simply looping through magma's database of finite groups. Assuming I didn't make a computational slip, the smallest counterexample has order 64, is the 73rd group of order 64 in magma's database, which has 8 representations of degree 1, 14 representations of degree 2, 8 elements in the centre and 14 more conj classes each of order 4.Sorry for such an unenlightening answer! About
Letting the only thing it does is answers loop go further, I see counterexamples of size 64, 128, 192 (I guess these are just the question..counterexamples of size 64 multiplied by Z/3Z) and then ones of order 243 (a power of 3). So I guess all examples I know are nilpotent. Are they all nilpotent? That's a question I don't know the answer to.