Solanine, a substance found in the stem and leaves of the tomato and related plants, is harmful to dogs in large quantities.
The leaves, stems, and young, green tomatoes contain higher amounts of solanine than ripe fruit, which means that ripe tomatoes are generally safe to feed to dogs.