This is an example of a very common pattern in which the {} of a verb + the particle + a verb of motion like or is used to express the idea of **going/coming somewhere in order to do something**. (In case you aren't familiar with the term , it's what is sometimes called the "verb stem" \-- that is, the -masu form of the verb, minus the -masu.) You can read about this pattern and see some other examples here, here, and here.
In your example, is the of the verb , as in {} (to run an errand for someone). And yes, is the form of the verb , "to come" ( of + ).
So
>
could be translated as
> I was asked by my grandfather [or possibly "by an old man"] to come to this town on an errand, and when I got here…