Programmable Unijunction Transistor Circuit
The comment link gives some of the basic circuit operations.  If that does not provide your answer below is a simple written out explanation for the use of the two resistors.

As the name implies, "Programmable Unijuntion Transistor", there needs to be a programmed voltage supplied to the Gate pin.  In this circuit the two resistors (15K and 27k) provide this programmed voltage by a voltage divider action. This programmed Gate voltage could be provided in other ways without using these resistors, for example by using another voltage source.

For the circuit to operate correctly the Anode voltage needs to rise from below the programmed trigger voltage to slightly above it (about 0.65V above). When the Anode voltage is slightly above the trigger voltage the PUT will turn on HARD (conducting from Anode to Cathode).  

So if only one or none of those resistors were connected (in this circuit) the Gate voltage would either be at 0v or 6v, and the slowly rising Anode voltage would not pass through the programmed trigger voltage level, it could only reach the same voltage or always be above the voltage, and the circuit would not work as expected.