If it's a really dark gray on the walls I would either paint the door white to match the molding or paint it a darker colour like in the picture above (personally I would do the white myself, I think it looks much cleaner). If it's a lighter gray, depending on the type/shade of wood you might be able to get away with leaving it as is. Pictures for reference might help