What political gains and losses did the Democratic Party's association with the Civil Rights Movement cause?
I would say that the association between the Democratic Party and the Civil Rights Movement led to the situation we now have where whites (and especially white men) tend to vote Republican (especially in the South) and where the Democratic Party is the party of almost all African-Americans.
Although the Democratic Party was not particularly pro-Civil Rights at first (because of its heavy Southern membership), it came to be associated with the movement because of the efforts of the Kennedy and Johnson administrations. This helped cement its popularity with black voters (which had started in the New Deal).
However, the association hurt the Democratic Party badly with white voters. It allowed Nixon to use the "Southern Strategy" in 1968 and 1972 and it helped Ronald Reagan win the South in 1980. Nowadays, the South is solidly Republican -- a move which started with the Civil Rights Movement.