"Grandfather is good at telling stories."
Translation:Farfar är bra på att berätta historier.
att is the infinitive marker.
In English, you sometimes use the infinitive where we do, and sometimes the gerund as here.
If you use the infinitive, you too use the infinitive marker, which is to in English: I like to sing or I like singing. So att has the same function that to has in English sentences like 'I like to sing'.
Hi KarelV. This might help you: https://www.duolingo.com/comment/21283756/Bra-vs-Duktig