Make sure you try some Oxbow beer; probably the best brewery in the state (imo). The brewery isn't in Portland, but you'll find a lot of places with it on tap. Maine Beer Company is great, they are currently moving to Freeport from Portland. Allagash is a good brewery to visit (and they are the biggest in the state). Rising Tide is also putting out some good beer. Bunker Brewing is down the street from Rising Tide, but I've never had their beer. Bull Jagger makes some great Lager beers. I'd skip Sea Dog and Shipyard, tbh.
Bars: Mama's Crowbar (cash only), Great Lost Bear (probably has the most taps in the city), Novare Res (down a back alley, can be hard to find if you don't know what you are looking for), and Thirsty Pig
Food: Duckfat is a must, Grill/Corner/Front Room - 3 different resturants owned by the same guy; all good, Gritty's Brewpub is decent (2 locations, Freeport and Portland), El Rayo (my personal fav), Fore St (make a reservation), and Hugos (if you want something really fancy and $$$$).
Big Sky Bakery is a must stop for breakfast. Gotta have a popper or a pocket, if you like pastries. I suggest getting some English Muffin bread too.
I lived in Portland for a few years. It is an amazing city, especially for food.