While Holmes and Watson are still in London, Dr. Grimesby Roylott comes to visit them at Holmes's place. I guess it would be more accurate to say that he barges in to Holmes's rooms very rudely.
The reason he has come is that he wants to find out what his stepdaughter has been doing. He knows that his stepdaughter has been to see Holmes and he wants to know what she asked Holmes about. Holmes does not tell him -- in fact, Holmes kind of baits him, trying to get him angry, it seems.
Roylott gets angry enough that he bends Holmes's poker and then leaves.
Dr. Grimesby Roylott of Stoke Moran visited - or rather barged into - Sherlock Holmes' office in London for the following reasons:
1. He wanted to find out what his stepdaughter Miss Helen Stoner had told Holmes:
My stepdaughter has been here. I have traced her. What has she been saying to you?”
2. To threaten Holmes and warn him not to meddle in his affairs:
Don't you dare to meddle with my affairs. I know that Miss Stoner has been here. I traced her! I am a dangerous man to fall foul of!
He then stormed out of Holmes' office after bending the poker with his bare hands!