Games like this will happen. It usually means you took the opponent's crappiness for granted and ran into their attacks mindlessly, and by the time you were ready to play it was all over.
When you get that feeling of "why did I get hit by that???" you either got clipped while backdashing or counterhit. When in close proximity of the opponent, take extra care when you're moving around. Triple tapping back will cause you to do an unsafe backdash and will cause you to get hit when you feel like you're blocking. Two taps and hold for safe backdashing. Backdash cancel only if you're confident in your ability to do it safely.
When you're spacing them out and they are constantly whiffing moves, pay closer attention to what they're whiffing. Many times they will throw out something that looks like you can run up and punish it, only for them to recover and hit you with a hopkick or something. You can bait this activity out by dash guarding (dashing up then blocking), but it's kinda difficult to do online. Regardless, if they are truly crappy then you don't have to bait anything; just wait for them to whiff something REALLY huge and kill them.
After that, it's a matter of clutch blocking and punishment. You mentioned getting hit with a Dragon Tail, yep that super sucks but it's considered a seeable low and thus you gotta practice blocking that thing on reaction and punishing it properly. It should encourage them to be more careful (it won't). Watch your replay and check for other things too. If there were any strings with lows that you could've low parried or highs that you can duck and punish. Stuff you blocked and missed punishes for. All those things add up in beating the opponent quicker and more efficient.
Good advice, man. Thanks. Oh, I know how to sniff Dragon Tails out but I consistently keep either (a) punishing it wrong or (b) getting hit by it because I treat it like every other low and try to parry it (online none the less...). Same with Bryan's Snake Edge.