A Distant Origin
"Clock position", that is, this lexical sense of 'clock',
2. In extended use: used following a numeral to indicate direction, bearing, etc., in various contexts, with reference to the position of the numeral 12 on an imaginary clock-face, this being usually thought of as directly above or in front of the observer.
["o'clock, adv. (and n.)". OED Online. December 2016. Oxford University Press. http://www.oed.com/view/Entry/130270?rskey=4rt27o&result=2&isAdvanced=false (accessed December 19, 2016).]
is first attested in OED Online from 1797:
1797 W. G. Maton Observ. Western Counties II. 129 The veins..run in a direction pretty nearly from south-east to north-west, or to use the terms of the miners themselves, lie at nine o'clock.
(Op. cit. Bold emphasis mine.)
Observations relative chiefly to the natural history, picturesque scenery, and antiquities, of the western counties of England, made in the years 1794 and 1796. Illustrated by a mineralogical map, and sixteen views in aquatinta by Alken, vol. 2. Maton, William George, 1774-1835.
The same use is found in an earlier work, The Practical Navigator, and Seaman's New Daily Assistant (John Hamilton Moore, 1791) for use of 'clock position' in navigation:
(Op. cit. See linked work for the "Table" mentioned.)
While the use in navigation remains somewhat opaque to me, it is clearly a case of 'clock' used "following a numeral to indicate direction, bearing, etc., ....". Observe that, comparing the miners' use and the navigators',
...a direction pretty nearly from south-east to north-west...lie[s] at nine o'clock....
...it is said to flow S.E. and N.W. or 3 Hours before the Meridian, that is, 9 o'Clock....
These uses by miners and navigators place one evidentiary origin of 'clock position' in 1791, and British English.
The Modern Origin
The second attestation in OED Online leaves a conspicuous ninety-one year gap.
1888 Pall Mall Gaz. 9 July 8/2 A..stiff breeze..called ‘eleven o'clock wind’..that is to say, supposing the target to be marked like the dial of a clock, the wind would blow..in the direction of the figure 11.
While Pall Mall Gazette was a London publication, other and earlier evidence of 'clock position' use by rifle marksmen, such as the clippings from The Sun (New York, 1876) and the Chicago Daily Tribune (1875), suggests the use was of US origin. Some of that evidence makes explicit what at least one journalist considered the source of the terminology:
The Sun (New York, New York), 10 Sep 1876.
The quality of that clipping is poor, so I've transcribed one relevant portion of it:
There is at Creedmoor [a 19th century US marksmens' rifle range] a clock dial with a hand connected with a weather vane, and every variation of the wind is readily seen, and thus riflemen come to speak of a "five o'clock wind," "ten o'clock wind," and the like.
Op. cit. Emphasis mine.
The Creedmoor Rifle Range opened in 1873 on Long Island, New York.
Another example, from the Chicago Daily Tribune (Chicago, Illinois), 14 Jul 1875:
Although this clipping came from a Chicago paper, the match reported was multinational, and held in Ireland.
The 'clock position' terminology used by rifle marksmen, which reportedly developed from the influence of the Creedmoor clock dial weathervane, is the likely progenitor of 'clock position' use in aviation and etc.
The Remote Origin
As others have pointed out, perhaps more ably than I shall, the connection between clock movement and relative direction is ancient in English. This is especially evident in, for example, English synonyms of 'clockwise'. One such synonym is
deasil | deiseal, adv. and n.
Righthandwise, towards the right; motion with continuous turning to the right, as in going round an object with the right hand towards it, or in the same direction as the hands of a clock, or the apparent course of the sun (a practice held auspicious by the Celts).
["deasil | deiseal, adv. and n.". OED Online. December 2016. Oxford University Press. http://www.oed.com/view/Entry/47765 (accessed December 19, 2016).]
From Gaelic roots, 'deasil' (1771) baffled me until I considered that in the northern hemisphere, an observer of the sun's "apparent course" from sunrise to sunset faces south, and turns to the right. Thus 'clockwise' is to the right. On a horizontal plane, then, 3 o'clock is to the left of the meridian, 9 o'clock to the right, 12 o'clock straight ahead, and 6 o'clock behind. The same directions pertain on a vertical plane, with only the difference that 12 and 6 o'clock become up and down, respectively.
'Sungates' (1597), an earlier synonym of 'clockwise', is similarly defined:
"In the direction of the apparent daily movement of the sun, that is (in the northern hemisphere), from left to right; ‘with the sun’" (op. cit.).