This page of The Last of Us game guide contains a walkthrough of the Hydroelectric Dam stage as part of the Tommy's Dam chapter. During the initial part of the stage, Joel and Ellie must solve environmental puzzles associated mainly with diving and turning the water supply valves. A group of bandits will attack shortly after the allies meet and you will have to fight a bigger battle.
After you start this stage, go ahead until you reach a void. Turn left there and slowly, go down to the brook.
By running against the current, you will soon reach one of the hydroelectric dams.
Climb the stairs an turn the red valve. This way, you will raise the first part of the bridge.
By using your knife, you can then open the door next to the stairs and search through the small storage.
To unblock the second part of the bridge, jump into water behind the small waterfall and dive.
You should notice a big sunken container while underwater. Swim into that container through one of the side walls and push the wooden palette outside, through the hole in the roof.
Thanks to the platform, you will be able to transport Ellie over to the other side of the dam.
While there, the girl will turn the other valve, which will raise the other part of the bridge.
Once you are at the other side, climb the stairs and keep to the right side of the path.
This way, you will reach a big gate. Before you try to open it, search through the entire area. In a small office, you will find some materials and a new revolver - El Diablo.
Past the gate, you will meet your brother and his girlfriend. As soon as the cutscene finishes, follow Tommy and check out the rooms that you pass by, in search of useful materials.
After the turbines are started, continue behind Tommy into the office downstairs.
There, a longer cutscene will start, after which you will be attacked by bandits. First, kill the nearest bandit with the weapon that you have just obtained and take the remaining ones from the left.
Further bandits are waiting on the stairs and in the room with the plan of the plant. Eliminate the latter ones by shooting through the broken windows.
There is another battle to fight outside. Before you start shooting, though, pick up the nearby hatchet.
First, hide behind the nearest cover and jump to the level below, through the breach in the balustrade.
The enemies are waiting for you to your right. After you kill them, you will reach a passage to that leads to the left, which will allow you to steal up on the remaining enemies from the flank.
Sneak up to the enemies and kill them with the hatchet.
Another group of bandits is waiting in the room a bit ahead. You need to kill them and then, to free Ellie and Tommy's girlfriend. A bit later, a longer cutscene will start.