Michael Crabtree caught two touchdown passes, one from kicker David Akers on a trick play, helping the San Francisco 49ers withstand a late rally.