No, resolution matters quite a bit. Graphics performance tends to scale just about linearly to resolution.
The Macbook would be running at 2880x1800, while the iMac is just 2560x1440. So, given the exact same processing power, the Macbook would run at about 70% the framerate ((25601440)/(28801800)~=0.7).
However, you don’t have the exact same processing power in each. The Macbook you have, from what I can look up, uses a Core i7-3740QM, and a GeForce 650M. The iMac would probably be the Core i3-550 and a Radeon HD 5670. So while your Macbook’s CPU is a lot better, the graphics might not be - honestly, I don’t know how to compare an AMD desktop card to an Nvidia laptop card, except by looking at benchmarks, but I’d venture a guess that the Radeon is a better card as far as per-pixel performance goes.
So the weaker hardware would have to push more pixels. This would obviously lead to worse performance.
However, you’re complaining about things happening when you spawn many NPCs. They don’t take up much of a graphics workload (no more than ragdolls, really) but they hit the CPU a lot harder. Unless there’s a configuration issue (GMod being locked to a single core, perhaps?), that shouldn’t act the way you say it is.
Now what might also be the issue is OS. Are you running Windows on either? You really ought to for gaming - I see a significant difference in performance on my Mac Pro when I switch between operating systems.