While the phones impressive it has it's limits, the D5100 will give you better results.
In general you get higher resolution files with greater dynamic range and more RAW data captured for post. This makes cropping images or pulling detail from shadows easier among other things.
With a good lens you get much better shallow depth of field and proper bokeh, the phones are still struggling to blur the right areas in portrait mode.
Taking photos at night? The D5100 on a tripod will destroy Samsungs night mode by capturing significantly more detail. Need to capture action in low light? Basically impossible on a phone, on the DSLR you can push the ISO and freeze motion. You can also get a speed light for $30, slap it on the camera, and have significantly better flash.