We introduce two new techniques to the analysis on fractals. One is based on the presentation of the fractal as the boundary of a countable Gromov hyperbolic graph, whereas the other one consists in taking all possible ``backward'' extensions of the above hyperbolic graph and considering them as the classes of a discrete equivalence relation on an appropriate compact space. Illustrating these techniques on the example of the Sierpinski gasket (the associated hyperbolic graph is called the Sierpinski graph), we show that the Sierpinski gasket can be identified with the Martin and the Poisson boundaries for fairly general classes of Markov chains on the Sierpinski graph.