While replacing gaskets on the suction line from #7 product pump on the HEC, employee attempted to maneuver pipe with a chain fall. Employee was having trouble aligning the pipe with the flanges and decided to use a pry-bar to move the pipe legs into place. While doing so the legs swung out allowing the pipe to swing pinning the employee's hand against the neighboring valve.