It would block the portal only if it also is a creature or object
The spell says:
Any creature or object struck by the ray is covered with a shimmering emerald field that completely blocks extradimensional travel.
So if this works will depend on the nature of the portal. The portal needs to also be a creature or object, otherwise you cannot target it with the spell. A creature is defined under common terms as "A creature is an active participant in the story or world. This includes PCs, NPCs, and monsters."
Object is not a defined term, so there is some leeway in GM ruling here.
For example, a Portal Oak could be considered an object or a creature, and be targeted by the spell, blocking its function, or a Mirror of Mental Prowess as a magic item would be an object that could likewise be blocked from functioning as a portal.
On the other hand, a portal such as a gate has no actual physical substance, so even if made permanent, it will not count as an object and cannot be targeted by the spell.
The more common appliction would be to cast this spell on the creature or object you want to keep from traveling, so they cannot use another, independent portal or spell to do so, but the way it is written would seem to allow to also block a portal from being passable, if you can target it, because that also could be
covered with a shimmering emerald field that completely blocks extradimensional travel
P.S. Your question asks specifically about spells from the Conjuration (Summoning) school that create a permanent dimensional gateway. There are very few such spells. The only one I found is Elemental Swarm and it only has a duration of 10 minutes per level. The portal created there is of the non-object nature that you could not cast Dimensional Anchor on. I suspect you mean just a portal or dimensional gateway in general, that could be used to conjure or summon monsters.