Whatâ€™s the deal with dominant 7ths? They donâ€™t sound nice. Why are they important? Why must I learn these awful beasts?
That's what's special about them. The "less nice sound" makes your ear want to hear a "nicer sound" (called resolving) and this is what makes music effective through a tension-release mechanism.
The Dominant 7 has several things going on.
Music typically has a Tonic or "home note", and usually you feel music is finished when it ends on the Tonic. The Dominant note is the 5th (in C major it's G; in Eb major it's Bb, etc.), the Dominant "wants to" go back to the Tonic. That's part of the motor pushing the music back home, and giving it motion and life, rather than being static.
G,B,D,F (G7 = V7) going to C,E,G (Tonic chord, in C major).
B is the "leading note" .... If you sing a scale and stop on B, everyone will be itching to hear C. So there is a pull to C.
B,F -- you get an interval called the "tritone" which is a semitone away from a perfect 5th, and also a semitone from a perfect 4th (as F,B). The tritone is an unstable sound that "wants to resolve". In fact, in part of the history of Western music, the tritone was banned from music. So again you will get this "resolving" from the edgy tritone, to its vanishing into the smooth intervals of a major or minor Tonic chord.
Btw, you may come to like this chord and its richer "edginess". It's very common in other music, such as jazz.