I'm assuming you are referring to a situation where the SEALs are tasked with protecting a ship, and the pirates en masse try to take it over? If you had say 12 positions with 2 SEALs each, one with a Minigun and the other a Barrett .50 cal to disable engines, along with their usual M-4's, sidearms, and perhaps some TOW's I like their chances.
The TOW's alone could decimate entire boats before they could get any shots off with their AK's.
If overran, they would have rally positions to fall back to with additional equipment.
Not a realistic situation unless they had specific intel that a certain ship was going to be hit, and had time to mount the mini's and everything.
Hell, at least make it 25 SEAL's and 5 Gurkhas? I think the key would be the stand off range of the SEAL's TOW's, and their rules of engagement. I mean if they have orders to start taking out pirate skiffs as soon as they are in range of a TOW, they could easily cut their numbers in half and perhaps scare the rest off?
And if air support was available, say a couple AH-64 Apaches, game over.