There are countless restaurants in Stockholm that offer traditional swedish food, especially in Gamla stan. But when you want a good quality and a friendly service, try Tradition. You can find the restaurant right at the beginning of Österlånggatan when entering the street from the royal palace. You find many typical swedish dishes such as (of course) köttbullar, kroppkakor (as on the picture), rimmed salmon with dill stewed potatoes and biff Rydberg and some more. Also try one of their delicious desserts. You can be sure that this is not a touristtrap and you'll spend a nice evening with very good food. It's usually very crowded, so reserve in advance to get a table. Check out their website for openinghours and the entire menu.
And when in Gamla stan, check out what you can see and do there or scroll through the blog to find out everything about the beautiful swedish capital city.