I figure, it doesn't make sense for the Ability NOT to be copied :O The damn gloop forms into a Pokemon and knows its every move? I'm pretty sure its going to know its Ability too. The games are retarted--HA!
Bulbapedia-under Transform's entry
Gastro Acid
If the Pokémon that is Transforming has previously had Gastro Acid used on it and then subsequently uses Transform without switching out beforehand, the Pokémon that it transforms into will not regain its ability, and thus will not change forms if the ability of the Pokémon transformed into causes this.
That means Ditto DOES gain the Ability of the opponent-if Gastro Acid can then nullify Ditto being able to use said Ability.