The eldest son of Queen Victoria, Edward Albert, Prince of Wales (later King Edward VII) in September-October 1860. There were prior visits to North America by members of the royal family, but they only (seem to have) visited Canada.
Edward, the Prince of Wales, was only nineteen when he came to the United States and Canada in the fall of 1860, the first member of the British royal family ever to visit North America. Huge celebrations welcomed him wherever he went, and crowds followed him in the streets. In New York, the prince received several parades, a nighttime procession illuminated by "torches, lamps, lanterns, transparencies and other luminosities," and an exclusive ball at the Academy of Music. In Washington, he was President James Buchanan's guest in the White House. The visit prompted a period of warm diplomatic relations between Britain and the United States, which quickly ended with the onset of the Civil War.
http://www.npg.si.edu/exh/brady/gallery/90gal.html
The first visit to Canada by a member of the Royal Family took place in 1786. Prince William, third son of King George III and Queen Charlotte, celebrated his 21st birthday as a young naval officer on the frigate Pegasus in the waters off Newfoundland and Labrador. Over the next two years, the future King William IV also enjoyed stays in Halifax and Quebec City.
In 1791, Prince William's younger brother, Prince Edward, sailed down the St. Lawrence River to Quebec City as commanding officer of the 7th Royal Fusiliers Regiment. Over the next decade, he held a number of military postings in Canada.
In 1857, Queen Victoria chose Ottawa as the capital of the Province of Canada (known as the Dominion of Canada from 1867). She was never to visit Canada or any of her other realms, but in 1860 her eldest son, Albert, Prince of Wales, visited the new capital to lay the cornerstone for the Parliament buildings.
The first female member of the Royal Family to visit Canada was Princess Louise, the sixth child of Queen Victoria. Her husband, the Marquis of Lorne, was appointed as Governor-General in 1878, and the couple spent five years in Canada.
https://en.wikipedia.org/wiki/List_of_royal_tours_of_Canada_(18th%E2%80%9320th_centuries)
royal.gov.uk/MonarchAndCommonwealth/Canada/Royalvisits.aspx no longer exists