The relationship between political parties and interest groups can be complicated. In some ways, they can be allies, but in other ways, they are really working at cross purposes to one another.
Interest groups and political parties can certainly work together. Some interest groups tend to agree with one party or the other almost all the time and will work to ensure that the party is able to win elections. For example, business interest groups will generally help Republicans while labor unions are almost uniformly in favor of the Democrats. These groups will usually do their best to help “their” parties.
But interest groups and parties can be opposed to one another, even if they are on the same side in general. The reason for this is that interest groups care about one specific issue or area of issues whereas parties want to build big coalitions. For example, Mayor Michael Bloomberg wants to enact gun control laws. This would generally be very good for Democrats. But right now, there are a number of Democrats trying to get reelected to the Senate from conservative states. Bloomberg wants to run ads against them because they did not support gun control. All he cares about is gun control. By contrast, the Democrats want pro-gun people to feel welcome in their party. Therefore, the Democratic Party and Bloomberg’s interest group are working at cross purposes because the Democrats want a large coalition while the interest group is focused only on its issue and doesn’t really care about helping the Democrats build their coalition.