Strictly speaking I would read that as saying where John Ramsay lived. You imply that the baptism is recorded in the register for Coupar Angus (a parish split between Angus and Perthshire), so that would be the church. Possibly.
However - at this era, it seems that in Scotland baptisms (and marriages) tended to take place outside the church and at the home. This took me, brought up in England, some time to realise - I know we shouldn't assume but I didn't realise I was assuming. So it is very likely that the baptism
did take place in Keithock.
The other aspect is - what was Keithock? Something that is a farm now might have been a slightly larger cluster of dwellings, possibly connected to the farm in some way. I've seen relatives recorded as born at X, where X is just two houses now, but in the 1851 census there are many more people recorded as born or living there than would fit in two small houses. I think many of these settlements around farms shrunk as people moved into towns. In fact, many disappeared - on an old map, that X was accompanied by two other nearby settlements, both totally vanished apart from tracks going there for no apparent reason now.
So while you may have found a Keithock near Brechin now, there may have been other Keithocks, with one near Coupar Angus. You have to get hold of some old maps and have a look - start with the NLS site
http://maps.nls.uk/. I've been caught myself by near-duplicate place-names in the past - there's still some I don't know which they were.
Alternatively, it could be that your Keithock really is near Brechin and there is some reason for the minister of Coupar Angus to record the child's birth - e.g. one of the parents came from there.