Well, it's a bit hard to know for sure what you've got going, there. Your description is a bit odd ["attached to +5 and Gnd"*]. So, it would be great if you would read the How to use this Forum post [near the top of every Forum Category], and then re-do your post, in compliance with it's guidelines.
But, the piece you are probably missing is the concept of "Clocking". A regular gate, for instance, a NAND gate, relies merely on static levels. Take a 2 input NAND gate, as an example: When both inputs are HIGH, the output is LOW. If either of the inputs go low, the output goes high.
A D Flip-Flop is a little different. If the clock input is at a static level [i.e. a steady HIGH or steady LOW], you can change the D input all you want, and it won't change the Q output [or the ~Q output, but I will speak only of the Q output, because the ~Q output always follows the inverse of the Q output (when only the D and Clk inputs are involved)].
BUT, if, say the D input is LOW, and the Clock transitions from LOW to HIGH, that "Clocks the D input, to the Q output", thus making the Q output LOW. So, for the Q output to change, the Clock must Transition from LOW to HIGH. This is know as a "Rising-Edge" Clock. If the D input is HIGH, and the Clock transitions from LOW to HIGH, the HIGH on the D input will be "Clocked" to the output, thus making the Q output HIGH. If Q was already HIGH, nothing changes, because the condition is already satisfied.
That is the only situation where the output of a D Flip-Flop changes [when using only the D and Clk inputs]. When the Clock input falls from HIGH to LOW, nothing changes. It's only when the Clock input rises from LOW to HIGH. It's on that edge that the magic happens. Another way of saying this is, the D Flip-Flop is edge triggered--the edge being that transition from LOW to HIGH. And the absolute most detailed way to language it is: The 4013 D-Type Flip-Flop is positive edge triggered.
There are Clock inputs that are negative edge triggered--which means a transition from HIGH to LOW. But the 4013 is positive edge triggered.
If that didn't resolve your issue, then I will need to see a schematic, and even, perhaps, a photo of your setup.
*Did you mean: the inputs range from +5 to Gnd?