The gap junctions electrically tie all the cardiac muscle cells in combination into a single contractile unit. The desmosomes inhibit the adjacent cells from segregating at the time of contraction, and the gap junctions permit ions to pass from cell to cell, conducting current through the whole heart.
The main function of the intercalated discs is to hold the nearby cells in combination by offering the sites of strong adherence.