Two Maryland companies, Union Trust Bancorp and Pargas Inc., posted second-quarter gains in earnings yesterday.

Union Trust, Baltimore-based parent of Union Trust Co. of Maryland, reported a 7 percent improvement in earnings before securities transactions of $3.47 million ($1.41 a share) from $3.24 million ($1.32) last year. After securities transactions, net income was $2.47 million ($1.01), down 19 percent from last year's second-quarter figure of $3.06 million ($1.25).

For the half, Union Trust's income before securities transactions was $7.2 million ($2.86) compared with $5.82 million ($2.37) last year. After securities transactions, the company had earnings of $6.22 million ($2.54), 16 percent higher than the $5.35 million ($2.18) last year.

Union Trust will pay a quarterly divided of 42.5 cents a share on Aug. 13 to holders of record July 9.

Waldorf-based Pargas posted second-quarter earnings of $803,000 (19 cents a share), compared with $459,000 (10 cents) last year.

For the half, Pargas earned $5.2 million ($1.24) compared with $6 million ($1.43) in 1981. Revenues in the half decreased to $133.3 million from $135.2 million last year.