Sir Richard Branson's airline was offered the slots following International Airline Group's takeover of Bmi, which previously ran the service. Virgin Atlantic chief executive Steve Ridgway said the acquisition of the route would mount a challenge to BA's short-haul flights to Heathrow
Mr Ridgway said: "We have fought hard for the right to fly short haul and take a strong challenge to British Airways within these shores.
"For 28 years, both airlines have battled for customers all over the world and it has meant that British consumers have had some of the world's best flying and lowest fares.
"This is the beginning of an exciting new era in Virgin Atlantic history."
Edinburgh Airport chief executive Gordon Dewar said: "We're focused on providing Scotland with choice, in terms of both routes and carriers, while extending its reach across the world. This new regular service does exactly that, giving choice to Heathrow and opening up a new set of onward destinations for passengers."
Transport Minister Keith Brown also welcomed the move, but repeated calls for Scotland to be given control over Air Passenger Duty in order to attract more international flights to the country's airports.
Mr Brown said: "We welcome this announcement and look forward to a long and productive relationship with Virgin Atlantic. However, we do remain concerned about the absence of competition on the Glasgow-to-Heathrow service as a con-sequence of Bmi's withdrawal of the service last year.
"While this announcement is welcome, it does address the more fundamental issue of Scotland's international con-nectivity and the need for more direct international flights to and from Scotland's airports."
Colin Keir, SNP MSP, whose Edinburgh Western constituency covers Edinburgh Airport, said: "This is fantastic news for passengers. The air links between Heathrow and Scotland are vital for our economy"
Flights will commence around March 31, 2013, and the firm hopes to use Airbus A320 aircraft to operate the service.