The bar in this case was the sand bank which crosses the mouth of the River Exe at about the latitude of Orcombe and is, I suppose the physical boundary between the estuary of the Exe and the English Channel, or more specifically Lyme Bay. But to us boys it had a much deeper significance.The context for the mouth of the Exe is explained in detail on pages 84-86 of Sailing directions for the English Channel and coast of France; with an accurate description of the coasts of England, south of Ireland, and Channel islands (J. and A. Walker, 1858) - the Exe and sea are separated by a sandbank that is exposed at low tide, with only a narrow channel parallel to the shore between sandbank and rocks. Such a bar is a common feature of estuary entrances; The boat and how to manage it ("Salacia", 1861) tells of the general difficulties in the turbulent waters encountered when "crossing the bar". The confluence of sea and river water has other strange properties: Historically, mariners used to think remoras grabbed their ship, making progress more difficult, as they entered estuaries. This, along with patches of rough water - "tide rips" - is now explicable in terms of solitons, subsurface waves on the interface between stratified salt and fresh water (see Making waves - singly, Scientific Computing World, May/June 2005).
To go over the bar was in itself an adventure but it was also a landmark in growing up.
It's not surprising that this dangerous zone of transition should be mentioned in many books, mostly literal descriptions: but a few writers have explored this passage from river to sea as a metaphor for the passage from life to death. The 1835 Memoir of the Rev. John Stanford, D.D puts it this way:
This day, to me, is somewhat like the mariner's when crossing over the bar which separates the ocean from the harbour's mouth, and which he seldom passes over without fear, and perhaps never without feeling; only with this difference—the mariner may repeatedly cross the same bar, and go in and out of port in the course of his life; but I am crossing that bar of old age, which I shall never cross again! No, here I must confine myself a little while, floating, as in shoal water, and wait until it shall please God to open to me the port of eternity.
But quite by coincidence I just ran into the same expression in Maxwell Gray's 1899 anthology The Forest Chapel and Other Poems, which I'm currently reading. In her poem On "Crossing the Bar" (pages 37-39) she exhorts the subject not to "cross the bar" just yet.
Embark not yet upon the purpling foam,
Though evening bid the child and labourer home,
Embark not yet awhile; thy music rare,
Thy glories visions, charm to sweeter air;
Her subject (as she was a fan and acquaintance) is Alfred, Lord Tennyson, and it's a belated reply (he died in 1892) to his 1889 poem Crossing the Bar, written in old age and contemplating his own mortality.
Sunset and evening star,
And one clear call for me!
And may there be no moaning of the bar,
When I put out to sea,
But such a tide as moving seems asleep,
Too full for sound and foam,
When that which drew from out the boundless deep
Turns again home.
Twilight and evening bell,
And after that the dark!
And may there be no sadness of farewell,
When I embark;
For though from out our bourne of Time and Place
The flood may bear me far,
I hope to see my Pilot face to face
When I have crossed the bar.
According to Wikimedia, Tennyson viewed this as a summation of his life's poetical works, and at his request it's traditionally placed at the end of anthologies of his poems.