Today, with the exception of Inwood Hill park, Manhattan is all built up. When did it all become urban?
Harlem became integrated with the City of New York (originally consisting of the land from Wall Street and below) after the establishment of the Commissioner's Plan of 1811, which laid out the city grid. However, the village of Harlem was largely destroyed during the Battle of Harlem Heights in 1776 and the subsequent occupation by the British of Manhattan during the American Revolution. Harlem was never entirely rebuilt, so at the time the Commissioner's Plan was put into action, Harlem was only a shell of what it had been before the war.
Everything below Greenwich Village on the west side, and everything below Houston Street for the rest of the city, was built before the Commissioner's Plan. Everything north of that, aside from parts of the Bowery and most of Broadway, was part of the grid that was first dug up and built beginning in 1811.
For reference, here is a map of Manhattan in 1776 and another one in 1836. As you can see, the grid had been laid out by 1836, but most of the island above 42nd Street still remained undeveloped rural land.
It took many more decades before the city had been built up enough that urban development reached Harlem. As late as the Civil War, most of the land above 42nd Street was still rural. Here is an 1861 illustration of the intersection of 2nd Avenue and 42nd Street looking south. As can be seen, the city that far north was still not heavily populated.
And it remained that way in the years after the Civil War, as can be seen in early photographs of Harlem like this one from 1869 and this one from c.1870.
By 1890, development had reached the "Harsenville" neighborhood which is now part of the neighborhood known as the Upper West Side. An 1890s photo of Grant's Tomb at 122nd Street and Riverside Drive show that that area was still pretty rural at that point.
Harlem was built up fairly quickly after that, because less than fifteen years later, it looked like this. Apartment buildings had been built beginning in the 1880s and 90s, so that by the 1910s, Harlem was contiguous with the rest of the city, and nearly completely urbanized. Here you can see what W. 125th Street and Lenox Avenue looked like by 1901, and [here] (http://imgur.com/lqRjCAs) is W. 125th Street near the same intersection in 1905.
It wasn't until WWII, however, that the entire island of Manhattan was completely urbanized (aside from Central Park). The Benedetto family farm operated until 1940 when the family sold the land for development. By the end of the war, the entire island was urbanized.
You may be interested in this book from 1903, which includes many photographs of the Harlem area at the time of publication. As can be seen, it's mostly urban by then, though there are still many undeveloped lots. It would be another decade or so before the entire area was filled in with urban development.
Further reading:
Harlem: The Four Hundred Year History from Dutch Village to Capital of Black America
City of New York, north of Canal Street 1808 to 1821
Revised History of Harlem: Its Origin and Early Annals