If your friend learns that you have been gossiping about them, be strong and apologise. Avoid making excuses. Explain that you now realise that it is both wrong and hurtful and you have made a determined decision to stop the gossiping habit.
Source: How to Stop Talking About Friends Behind Their Backs @ wikiHow
image by Pezibear under CC0 license