Instructions
Make both Ron and Harry shoot five target dummies with the Expelliarmous spell to complete the training lesson.
Shoot Malfoy five times with Expelliarmous to defeat him in a duel. Afterward, watch the cutscene and you will learn the Parseltongue skill.
Head right through the Great Hall and up the stairs. When you enter the Upper Hallway, head left and you will see a painting of a snake head. Press "Z" at the painting to speak Parseltongue, which will make the snake pieces drop out of the painting.
Press "1" to switch to your Leviosa spell, and lift up the largest part of the snake body, which is the bottom piece. Place it down on the pedestal to the left of the gate.
Pick up the torso of the snake and place it on top of the tail. Place the snake head piece on top of the torso, and the gate will open.