First off, you'll need a lancer and some grenades. Both are provided on the boat, free of charge.
Cut the tentacles as they appear and slam onto the deck. They'll appear three times, at which point you'll see the monster come closer and ultimately bite the boat's bow. Now you need to shoot the Leviathan's eyes (I think you can do it on either side, but the one on your right is a better pick) as it opens - do this twice and the creature will open it's mouth.
At this point you'll need to be fast and run into the giant mouth. More tentacles await inside, glowing blue when they're about to lash out at you. Once a few have been shot the creature's throat (or whatever) will start squirming. This is your chance to chuck a grenade into it - if you fail, you'll have another chance to shoot the tentacles and try again, but once you fail twice you'll get eaten.
If your aim is true the throat will explode, sending you back out onto the boat. Now repeat the whole process two more times and the Leviathan will sink to the bottom.