I figured out the problem. The source must refer to the object and the path must refer to the property of the source object to which the binding is being bound. The complete code is below.
Binding tempSourceBinding = new Binding();
tempSourceBinding.Source = layers[layerIndex].layerImage;
tempSourceBinding.Path = new PropertyPath("Source");
tempSourceBinding.Mode = BindingMode.TwoWay;
Image tempImage = new Image();
tempImage.SetBinding(Image.SourceProperty, tempSourceBinding);
curGrid.Children.Insert(0, tempImage);
The GetBindingExpression and UpdateSource code is not necessary.