ALERT ALERT rant warning
I personally feel that an image hanging on a wall needs to be able to withstand three different viewing distances fairly well
(1) too far (i.e. way past ideal--like 5 feet for a 4"x5" print)
(3) with a magnifying glass.
probably most images will handle 1 and 2 fine. Nearly anything hung in a gallery looks freaking awseome when lit up and surrounded by beautiful people. That's the function of a gallery, right? That and to confer the laurels of respect and therefore price. #1 and #2 have a lot of 'atmosphere' lent by the white walls, super cool concrete warehouse space, second glass of wine, etc. #1 in particular has a lot to do with just not messing up (i.e. hang the image straight on the wall) more than doing anything special.
I personally can't stand when supposedly 'professional' images can't deal with #3. I'm being a bit bombastic by saying magnifier close, but I am dead serious when I mean, really, really seriously looking at the physicality of the pigment on the paper close. I mean, you are a serious photographer right? Now we are talking about galleries here, not billboards or some other commercial application where it's understood that the image is there to pimp something else and you as photographer don't get the final say so corners might be cut for the man. In a gallery, it's 'art'--photographer in complete control. No cutting corners. Full on 100% integrety to the 'work'. Sacred space, etc.
To me, if you are on a gallery wall, you are saying you are a pro, like the real thing and you take it seriously and sweat the details--like "please, viewer, take a moment and really look, 'cos I worked really long and hard on this and thought about all the details and sweated mightly on this effort." So say you actually get someone who isn't just there as a pretense to pick up chicks, someone who is really engaging the work, who is willing to concentrate for like over a millisecond to really look at it. Well, you gotta meet that engagement all the way. And that to me means you gotta make the print quaility super mega high--magnifying glass close. It's just not meeting your end of the bargain to say it's only in bounds to stay 20" away. That's just not fair to those who are actually willing to focus. I mean, really? Diagonal of the print and no closer?
Back in the ol' film days when it was unheard of for people to 'send out for prints', there was a lot of emphasis on really honing the print quality craft. Not easy. It doesn't seem like a lot of folks raised digitally are very aware of what it means to actually take an image to pigment on substrate. It's much harder to work that end of the craft when it just goes to a black box (the print house) and comes out the other side done. Not that I'm dissing on digital--just that there seems to be generally a lack of appreciation for the physical print quality given that a majority of images never make it onto paper. In other words, back in the bad old days of film and darkrooms, you basically only had a 'photograph' when you had a print (ok--some people worked in chromes so I'm cheating a bit here). So it was a significant part of becoming a photographer of any sort to actually get pigment deposited on a ground. Now that Photoshop has overtaken (mercifully) photochemestry, a lot of really good photographers haven't a clue what 'a fine print' actually looks like & what it takes to make one. Printing is sort of an afterthought at best.
Oh, to answer the question: you need to print at an LPI that can withstand the magnifying glass, which, in turn, will dictate the maximum size a particular image can go before it falls to pieces. This site has some great threads on printing and LPI. I personally do not enlarge so my native uncropped 18MP file at 360 lpi to match my epson printer ends up with something like 11x15 prints, just as an example.