bar (n.2) "tavern," 1590s, so called in reference to the bars of the barrier or counter over which drinks or food were served to customers
http://www.etymonline.com/index.php?term=bar
The Oxford English DIctinary, 2nd Edition, the definitive resource for English etymologies and definitions, states:
"28. a. A barrier or counter, over which drink (or food) is served out to customers, in an inn, hotel, or tavern, and hence, in a coffee-house, at a railway-station, etc.; also, the space behind this barrier, and sometimes the whole apartment containing it.
1592 Greene Art Conny Catch. iii. 20 He was acquainted with one of the seruants..of whom he could haue two pennyworth of Rose-water for a peny..wherefore he would step to the barre vnto him.
1601 Shakes. Twel. N. i. iii. 74 Bring your hand to’th Buttry barre, and let it drinke.
1712 Addison Spect. No. 403 _9, [I] laid down my Penny at the Barr..and made the best of my way to Cheapside.
1835 Marryat Jac. Faith. xii, He sees the girl in the bar.
1837 Hawthorne Amer. Note-bks. (1871) I. 42 A bottle of champagne was quaffed at the bar."