These two terms, often used interchangeably are not the same.
A logo is just a mark that visually identifies a brand. It can be a graphic image, the typographical representation of the brand or a combination of both.
A visual identity is a broader concept that encompasses all of the visual elements that make up the look and feel of a brand. It includes the logo, the colour palette, the fonts, image style, layouts and any other graphic element supporting the brand (business cards, packaging etc.). All of these elements are outlined in a brand style guide.