Unlike CivIII, both the attack and defense value of both the attacker and defender are used in all combats. In CivIII, attacking something with a 12 def with an 8 atk, you'd expect to loose quite often. However, even the combat transport has an attack of 0. Now, on ships where the defense is higher than the attack, when they're attacked, half their defense gets added to the attack, so in the first case, the combat transport (assuming no bonuses apply) would have an attack of 4 and defense of 8, against the frigates attack of 5 and defense of 4, things would still favor the combat transport, but if the frigate has been upgraded to 8 and 7, then unless the combat transport has been upgraded, it's in trouble.
Also note that there are techs and such that can increase the number of hitpoints, and that is quite important as well. If your ships didn't get much of a HP bonus but this particular AI did, then that's even more of an advantage.