Why is the principle of separation in GFC opposite to electrophoresis despite using same material for the gel?
Gel electrophoresis and gel filtration chromatography both use gel materials (though often polyacrylamide gels are used for GE and cross-linked dextran gels for GFC), but their operating principles are different.

In GE, the gel is a solid block of gel which contains only small pores for proteins to pass through.
The proteins generally have to be denatured (and given a charge) to pass through the pores as native proteins are too bulky.
The denatured proteins are like long strands of noodles being drawn through the gel and shorter proteins pass through more quickly because they don't have to contort as much to fit through all the pores—the larger the protein, the more interactions with the gel to slow it down.

However, GFC is a subset of what is known as Size Exclusion Chromatography.
SEC techniques generally also use porous gels, but instead of using a solid block of gel, the gel is made into small beads.
A similar situation to GE exists where small things can enter the pores of the gel and larger molecules suffer more resistance to pass through the gel, only now, the larger molecules have an alternative route with lower resistance—going completely around the beads.
The effect of this is that small molecules pass into the pores of the beads and slow down, while larger molecules bypass the beads entirely and travel faster (what is considered small and large depends on the gel's pores).

GE has the benefit of much better size separation, but requires denatured proteins.
SEC can handle native proteins (that are still functional on the other side of your column), but the separation is more akin to dialysis, where small and large molecules are easily separated from each other across a cutoff molecular mass, but there is otherwise poor resolution between species.