The sentence
On the evening that the material allegation of facts begins, Hedges was bidding dull care begone in the company of five or six good fellows -- acquaintances and friends who had gathered in his wake.
means
On the evening that the material allegation of facts begins, Hedges was having fun in the company of five or six good fellows -- acquaintances and friends who had gathered in his wake.
To bid someone means to ask, command, request someone to do something. Hence, to bid dull care begone means "to ask of dull care to be gone away", or:
to say to dull care: begone!
that is, to send one's cares and troubles off.
I cannot tell offhand what grammatical role begone plays in the sentence. It is described as an interjection in Wiktionary.
I find O. Henry's stories the hardest to unravel but the unraveling itself is part of the fun and adds to the fun, as opposed to many other texts where it is part of the job and adds to the job.