Worf first came to DS9 in 'Way of the Warrior'.
However, the Enterprise has been to DS9 many times before that, such as in 'Emissary'.
In TNG 'Birthright Part 1' Worf was there for quite a while, trying to find out about the rumour that his father was still alive.
Also as Curzon Dax, he/she/it/the entity known as Jadzia Dax must have met either Worf or his father on Qo'nos.
They grew to like each other slowly, because they shared the same interests. It was probably when they went after the 'Sword of Kahless' that they spent much time together alone.