It's an interjection, always used to settle a baby or child down to sleep.
"rock-a-bye, Baby," sang Alfred in strident tones and he swung the child high in his arms.