This is a two phase fight. The first phase is more difficult and it sounds like the one you are having trouble with.
In the first phase, Gohma has armor and will strike you with her arms. The natural thing to try is to grapple Gohma's eye - but that won't work as the armor plating protects her.
You need to grapple the dragon tail which is swinging from the ceiling. Some people go offensively, focusing on grappling the tail only. Others go defensively, avoiding arm attacks and waiting to grapple until an arm is stuck or the boss takes a break. The attacks may be easier to avoid if you focus target the boss. If the boss places both arms on the ground, then a fire attack is coming - roll past the arms to avoid it.
Once the tail is grappled, swing across to the other side (don't fall in the lava). It is not important to land on the upper levels. After you land, the roof will fall on Gohma, weakening her armor. You will be unable to repeat the grapple until Gohma replaces the roof (this takes a few seconds). After doing this three times, the armor will break and you're on to phase two.
Phase two is much easier. Without her armor, you are free to grapple the eye and then attack with the sword. There is little reason to avoid attacks, just get the kill.