Yes, the photograph is real and comes from Adam Wrinkler's book "Gunfight: The Battle over the Right to Bear Arms in America" which he mentioned in an article on Huffington Post on the topic of gun control in the Wild West:
Guns were obviously widespread on the frontier. Out in the untamed
wilderness, you needed a gun to be safe from bandits, natives, and
wildlife. In the cities and towns of the West, however, the law often
prohibited people from toting their guns around. A visitor arriving in
Wichita, Kansas in 1873, the heart of the Wild West era, would have
seen signs declaring, "Leave Your Revolvers At Police Headquarters,
and Get a Check."
A check? That's right. When you entered a frontier town, you were
legally required to leave your guns at the stables on the outskirts of
town or drop them off with the sheriff, who would give you a token in
exchange. You checked your guns then like you'd check your overcoat
today at a Boston restaurant in winter. Visitors were welcome, but
their guns were not.
In my new book, Gunfight: The Battle over the Right to Bear Arms in
America, there's a photograph taken in Dodge City in 1879. Everything
looks exactly as you'd imagine: wide, dusty road; clapboard and brick
buildings; horse ties in front of the saloon. Yet right in the middle
of the street is something you'd never expect. There's a huge wooden
billboard announcing, "The Carrying of Firearms Strictly Prohibited."
While people were allowed to have guns at home for self-protection,
frontier towns usually barred anyone but law enforcement from carrying
guns in public.
When Dodge City residents organized their municipal government, do you
know what the very first law they passed was? A gun control law. They
declared that "any person or persons found carrying concealed weapons
in the city of Dodge or violating the laws of the State shall be dealt
with according to law." Many frontier towns, including Tombstone,
Arizona--the site of the infamous "Shootout at the OK Corral"--also
barred the carrying of guns openly.
Other cities had similarly restrictive gun laws and fines were issued for breaching them,
And one fact is usually ignored: Back then, Tombstone had far
stricter gun control than it does today. In fact, the American West's
most infamous gun battle erupted when the marshal tried to enforce a
local ordinance that barred carrying firearms in public. A judge had
fined one of the victims $25 earlier that day for packing a pistol.
"You could wear your gun into town, but you had to check it at the
sheriff's office or the Grand Hotel, and you couldn't pick it up again
until you were leaving town," said Bob Boze Bell, executive editor of
True West Magazine, which celebrates the Old West. "It was an effort
to control the violence."
The fact that firearms had to be checked explains why contemporary accounts would make reference to secreting their firearms at times,
There were no dissenters to the program. I saw at a glance that my
Bunkie was heart and soul in the play, and took my cue and kept my
mouth shut. We circled round the town to a vacant lot within a block
of the rear of the dance hall. Honeyman was left to hold the horses;
then, taking off our belts and hanging them on the pommels of our
saddles, we secreted our six-shooters inside the waistbands of our
trousers. The hall was still crowded with the revelers when we
entered, a few at a time, Forrest and Priest being the last to arrive.
Forrest had changed hats with The Rebel, who always wore a black one,
and as the bouncer circulated around, Quince stopped squarely in front
of him. There was no waste of words, but a gun-barrel flashed in the
lamplight, and the bouncer, struck with the six-shooter, fell like a
beef. Before the bewildered spectators could raise a hand, five
six-shooters were turned into the ceiling. The lights went out at the
first fire, and amidst the rush of men and the screaming of women, we
reached the outside, and within a minute were in our saddles. All
would have gone well had we returned by the same route and avoided the
town; but after crossing the railroad track, anger and pride having
not been properly satisfied, we must ride through the town.
As an aside, the gun check laws are the reason why we have such artifacts as Wyatt Earp's gun:
Wyatt Earp's pistol at the Red Dog Saloon