Slope of the data has to do with the general trend of the data. It’s calculated in two-dimensions by finding a line that best fits through a set of data points. Most times you find either a negative or positive slope depending on the trend of the data points.
Example 1: In a set of bolts in a given machine, the efficiency and productivity is directly proportional to the yields. If the bolts are tightly attached, the efficiency is higher. Conversely, if the bolts are loose, the efficiency is low. Data is collected and analysed. The relation of the tightly put bolts to efficiency had a correlation of 0.96 and the loosely attached bolts relation to efficiency had a correlation of 0.2.
Correlation Coefficient connotes how well the data fall on/near the line. In this example above, set is much 'tighter' thus having a higher correlation depicting higher efficiency, whereas the other set is a bit more 'loose' and therefore has a lower correlation.
The correlation coefficient and the slope of the data set may be differ or not but the sign both carries will always be the same. If the correlation coefficient is positive then the slope will always be positive. If the correlation coefficient is negative then the slope will always be negative.