Chiefs quarterback Alex Smith struggled against his former team, and backup San Francisco quarterback B.J. Daniels threw a late touchdown pass to give the 49ers a 15-13 victory over Kansas City in a preseason game Friday night.