Given the context, he seems to be referring to a .45 caliber hand gun.
It may be important to note that there have been many songs over the years that set a serious topic to upbeat music. One of the most famous examples is Electric Avenue by Eddy Grant.
45, yeah, do the 45. (x2)
Well, you heard about the shotgun, how bad it's gonna be. I got news for you baby; just listen to me.
You're twining and whining, like all the rest. Well, I got my 45, and I'll create a big mess.
45, yeah, do the 45. (x2)
Well, here comes little sister; she's twisting up a storm. She's doin' the 38 and she's waving her arms.
Well come on, young girl, and dance with me. I've got my 45, and I'm as bad I can be.
Now don't just stand there lookin' so dumb. Act like Jesse James and have you some fun.
Everybody's dancing and moving all around. They've got their 45s and they're the best in town.
45, yeah, do the 45. (x2)
Come on girl, do the 45, twist up a storm baby, do the 45. Whining and twining, do the 45. Hey, hey hey.
45, do the 45. (repeats)
Interpretation of bold lines:
Well, you heard about the shotgun, how bad it's gonna be. : A shotgun is another type of gun. Shootings are considered a bad thing.
Well, I got my 45, and I'll create a big mess : Again, shootings are bad. They create a "mess" in the literal sense that bodies and crime scenes will need to be cleaned-up, as well as political and social fallout (riots, protests, etc.)
She's doin' the 38 : A "38" commonly refers to a .38 caliber hand gun. This is what sealed the hand gun analogy for me. A 45 can also be a record, but there are no 38 records.
Act like Jesse James and have you some fun. : Jesse James was an infamous outlaw in "Old West" of the United States. He was known to be violent and to have murdered many people.
Other uses of "45" outside of a firearm:
"45" record: The most common form of the vinyl single is the 45 or 7-inch. The names are derived from its play speed, 45 rpm, and the standard diameter, 7 inches (18 cm).
"Colt 45": Refers to cheap malt liquor, and is made even more famous in the song Crazy Rap by Afroman (caution explicit lyrics).