It's not so much the dam itself that's the problem, but the body of water that sits adjacent to it that provides the pressure for power. Those dam lakes are wide and deep, with little oxygen and plenty of algae and bacteria floating around at the bottom. When plant matter is carried down the river, it settles on the lake bed, making a hearty meal for the aforementioned bacteria. When broken down, the old leaves and branches are turned into methane and CO2, which then rise up into the atmosphere.
Bridget Deemer, lead author of the study, told the Guardian that while methane doesn't linger in the atmosphere like CO2, it's probably worse. She's quoted saying "Over the course of 20 years, methane contributes almost three times more to global warming than CO2." If nothing changes, and we expand the number of hydroelectric stations we build in the future, then those numbers will increase.
On the upside (please God, let there be an upside), this doesn't mean we should abandon the technology outright. Instead, future projects need to take into consideration ways to reduce the proliferation of plant matter and bacteria. Or maybe just hire thousands of unemployed pool attendants to rake out the bottom once a month.