The two films could make the same amount of money, and Star Trek would be regarded as a hit and Wolverine as a disappointment. Wolverine cost about $60 million more to make, so it needs to make more money to turn a profit. On top of that, Wolverine is getting compared to the earlier X-Men films, while Star Trek is being measured against the previous Trek movies. X2 and The Last Stand both made over $200 million domestically. In contrast, no Star Trek film has ever done over $150 million, and Nemesis did much less than that ($67 million).
It boils down to the fact that the studio had much higher expectations for Wolverine, and it's being judged accordingly.