New gaskets sometimes take a day or 2 to align themselves with the cabinet. Taping the door closed for 1-2 days will cause the gasket to align.
If the gasket has gaps because the door is warped you need to adjust it. Loosen the screws that hold the inner door liner to the outer door. Bend or warp the door until it is true with the cabinet. Tighten the 2 screws at each corner and be sure the door is still true with the cabinet. If the door is true, tighten the other screws. When you tighten the screws hold the outer door panel with one hand while you tighten. This will keep the door true.
Wash the front of the cabinet where the door gasket seals with water and a mild detergent to remove any grease. Wash the sealing edges of the gasket as well.